How to Create Network Firewall Rule on Amazon Web Services(AWS).
AWS Network Firewall is a managed service that makes it easy to deploy essential network protections for all of your Amazon Virtual Private Clouds (VPCs). AWS Network Firewall also offers web filtering that can stop traffic to known bad URLs and monitor fully qualified domain names.
An AWS Network Firewall rule group is a reusable set of criteria for inspecting and handling network traffic.Stateful – Defines criteria for examining a packet in the context of traffic flow and of other traffic that’s related to the packet. Network Firewall uses a Suricata rules engine to process all stateful rules.
- Login to aws portal.
- Click on Services.
- Under Networking & Content Delivery select VPC.
- Click on Network Firewall rule groups.
- Click on Create Network Firewall rule group.
- Network Firewall rule groups are either stateless or stateful.
Stateful rule group
- Network Firewall uses a Suricata rules engine to process all stateful rules. You can write any of your stateful rules in Suricata compatible format.
- Provide Stateful rule group name.
- Provide capacity must be greater than or equal to 1 & less than 10000.
- Select stateful rule group options.Choose 5-tuple.
- then add a rule.
- Select protocol.
- Provide Source & Destination IP address : Custom or Any.
- Provide Traffic direction.Inspect all traffic going forward,from the source to destination.
- Select Action.
- Click on Add rule.
- Click on create stateful rule group.
- After sometime stateful rule group is ready.
Stateless rule group
- Stateless rule groups evaluate packets in isolation, while stateful rule groups evaluate them in the context of their traffic flow.
- Provide stateless rule group name.
- Provide capacity must be greater than or equal to 1 & less than 10000.
- Set the priority.
- Select Protocol.
- Provide Source & Destination IP address : Custom or Any.
- Select TCP Masks & Flags.
- Select Actions.
- Click on Add rule.
- Click on Create stateless rule group.
- After sometime stateless rule group is ready.
Create Network Firewall Rule group using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Run the following command:
create-rule-group –rule-group-name rule-group-name [–rule-group <value>] [–rules <value>] –type stateful or stateless –capacity <value>