Creating a Firewall
Learn how to create a network firewall with an attached policy that uses rules, lists, and mapped secrets to control how network traffic is handled.
- Required IAM Service Policy permissions for Network Firewall, and permission to work in the compartment you want to use.
- A separate compartment for your network firewalls and policies so that management is easier and more secure. This is optional, but recommended by Oracle.
- An Oracle Cloud Infrastructure VCN and subnets. For more information, see VCNs and Subnets.
- IP addresses, ports, and URLs that you want to allow or deny access to.
-
A network firewall policy to attach to the firewall. If you're using the console, you can create a policy as part of the workflow. If you're using the API or CLI, you must create a policy first, and then create the firewall.
- If the rules configuration in the firewall policy includes certificate authentication to decrypt network traffic, you need an Oracle Cloud Infrastructure Vault secret for each inbound or outbound key. See Setting Up Certificate Authentication for instructions.
- For better performance, Oracle recommends that you do not add stateful rules to the security list attached to the firewall subnet or include the firewall in a network security group (NSG) containing stateful rules.
- Security list or network security group (NSG) rules associated with the firewall subnet and VNICs are evaluated before the firewall. Be sure that any security list or NSG rules allow the traffic to enter the firewall so that it can be evaluated appropriately.
- If the policy you use with the firewall doesn't have any rules specified, the firewall denies all traffic.
- Note
Before you begin, use the oci network-firewall network-firewall-policy create command and required parameters to create a policy for a network firewall.
Use the oci network-firewall network-firewall create command and required parameters to create a network firewall. oci network-firewall network-firewall create --compartment-id compartment_id --subnet-id subnet_id --network-firewall-policy-id network_firewall_policy_id[OPTIONS]
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
- Note
Before you begin, Use the CreateNetworkFirewallPolicy operation to create a policy for the network firewall.
Use the CreateNetworkFirewall operation to create a network firewall.