Use Case: Secure the EC2 Instances in the AWS Cloud
Table of Contents
Expand all | Collapse all
-
- VM-Series Deployments
- VM-Series in High Availability
- IPv6 Support on Public Cloud
- Enable Jumbo Frames on the VM-Series Firewall
- Hypervisor Assigned MAC Addresses
- Custom PAN-OS Metrics Published for Monitoring
- Interface Used for Accessing External Services on the VM-Series Firewall
- PacketMMAP and DPDK Driver Support
- Enable NUMA Performance Optimization on the VM-Series
- Enable ZRAM on the VM-Series Firewall
-
- VM-Series Firewall Licensing
- Create a Support Account
- Serial Number and CPU ID Format for the VM-Series Firewall
- Use Panorama-Based Software Firewall License Management
-
- Maximum Limits Based on Tier and Memory
- Activate Credits
- Create a Deployment Profile
- Manage a Deployment Profile
- Register the VM-Series Firewall (Software NGFW Credits)
- Provision Panorama
- Migrate Panorama to a Software NGFW License
- Transfer Credits
- Renew Your Software NGFW Credits
- Deactivate License (Software NGFW Credits)
- Delicense Ungracefully Terminated Firewalls
- Set the Number of Licensed vCPUs
- Customize Dataplane Cores
- Migrate a Firewall to a Flexible VM-Series License
-
- Generate Your OAuth Client Credentials
- Manage Deployment Profiles Using the Licensing API
- Create a Deployment Profile Using the Licensing API
- Update a Deployment Profile Using the Licensing API
- Get Serial Numbers Associated with an Authcode Using the API
- Deactivate a VM-Series Firewall Using the API
- What Happens When Licenses Expire?
-
- Supported Deployments on VMware vSphere Hypervisor (ESXi)
-
- Plan the Interfaces for the VM-Series for ESXi
- Provision the VM-Series Firewall on an ESXi Server
- Perform Initial Configuration on the VM-Series on ESXi
- Add Additional Disk Space to the VM-Series Firewall
- Use VMware Tools on the VM-Series Firewall on ESXi and vCloud Air
- Use vMotion to Move the VM-Series Firewall Between Hosts
- Use the VM-Series CLI to Swap the Management Interface on ESXi
-
-
- Supported Deployments of the VM-Series Firewall on VMware NSX-T (North-South)
- Components of the VM-Series Firewall on NSX-T (North-South)
-
- Install the Panorama Plugin for VMware NSX
- Enable Communication Between NSX-T Manager and Panorama
- Create Template Stacks and Device Groups on Panorama
- Configure the Service Definition on Panorama
- Deploy the VM-Series Firewall
- Direct Traffic to the VM-Series Firewall
- Apply Security Policy to the VM-Series Firewall on NSX-T
- Use vMotion to Move the VM-Series Firewall Between Hosts
- Extend Security Policy from NSX-V to NSX-T
-
- Components of the VM-Series Firewall on NSX-T (East-West)
- VM-Series Firewall on NSX-T (East-West) Integration
- Supported Deployments of the VM-Series Firewall on VMware NSX-T (East-West)
-
- Install the Panorama Plugin for VMware NSX
- Enable Communication Between NSX-T Manager and Panorama
- Create Template Stacks and Device Groups on Panorama
- Configure the Service Definition on Panorama
- Launch the VM-Series Firewall on NSX-T (East-West)
- Add a Service Chain
- Direct Traffic to the VM-Series Firewall
- Apply Security Policies to the VM-Series Firewall on NSX-T (East-West)
- Use vMotion to Move the VM-Series Firewall Between Hosts
-
- Install the Panorama Plugin for VMware NSX
- Enable Communication Between NSX-T Manager and Panorama
- Create Template Stacks and Device Groups on Panorama
- Configure the Service Definition on Panorama
- Launch the VM-Series Firewall on NSX-T (East-West)
- Create Dynamic Address Groups
- Create Dynamic Address Group Membership Criteria
- Generate Steering Policy
- Generate Steering Rules
- Delete a Service Definition from Panorama
- Migrate from VM-Series on NSX-T Operation to Security Centric Deployment
- Extend Security Policy from NSX-V to NSX-T
- Use In-Place Migration to Move Your VM-Series from NSX-V to NSX-T
-
-
- Deployments Supported on AWS
-
- Planning Worksheet for the VM-Series in the AWS VPC
- Launch the VM-Series Firewall on AWS
- Launch the VM-Series Firewall on AWS Outpost
- Create a Custom Amazon Machine Image (AMI)
- Encrypt EBS Volume for the VM-Series Firewall on AWS
- Use the VM-Series Firewall CLI to Swap the Management Interface
- Enable CloudWatch Monitoring on the VM-Series Firewall
- VM-Series Firewall Startup and Health Logs on AWS
-
- Use AWS Secrets Manager to Store VM-Series Certificates
- Use Case: Secure the EC2 Instances in the AWS Cloud
- Use Case: Use Dynamic Address Groups to Secure New EC2 Instances within the VPC
-
- Intelligent Traffic Offload (DPU and Non-DPU)
-
- Deployments Supported on Azure
- Deploy the VM-Series Firewall from the Azure Marketplace (Solution Template)
- Deploy the VM-Series Firewall from the Azure China Marketplace (Solution Template)
- Deploy the VM-Series with the Azure Gateway Load Balancer
- Create a Custom VM-Series Image for Azure
- Deploy the VM-Series Firewall on Azure Stack
- Deploy the VM-Series Firewall on Azure Stack HCI
- Enable Azure Application Insights on the VM-Series Firewall
- Set up Active/Passive HA on Azure
- Use Azure Key Vault to Store VM-Series Certificates
- Use the ARM Template to Deploy the VM-Series Firewall
-
- About the VM-Series Firewall on Google Cloud Platform
- Supported Deployments on Google Cloud Platform
- Create a Custom VM-Series Firewall Image for Google Cloud Platform
- Prepare to Set Up VM-Series Firewalls on Google Public Cloud
-
- Deploy the VM-Series Firewall from Google Cloud Platform Marketplace
- Management Interface Swap for Google Cloud Platform Load Balancing
- Use the VM-Series Firewall CLI to Swap the Management Interface
- Enable Google Stackdriver Monitoring on the VM Series Firewall
- Enable VM Monitoring to Track VM Changes on Google Cloud Platform (GCP)
- Use Dynamic Address Groups to Secure Instances Within the VPC
- Use Custom Templates or the gcloud CLI to Deploy the VM-Series Firewall
-
- Prepare Your ACI Environment for Integration
-
-
- Create a Virtual Router and Security Zone
- Configure the Network Interfaces
- Configure a Static Default Route
- Create Address Objects for the EPGs
- Create Security Policy Rules
- Create a VLAN Pool and Domain
- Configure an Interface Policy for LLDP and LACP for East-West Traffic
- Establish the Connection Between the Firewall and ACI Fabric
- Create a VRF and Bridge Domain
- Create an L4-L7 Device
- Create a Policy-Based Redirect
- Create and Apply a Service Graph Template
-
- Create a VLAN Pool and External Routed Domain
- Configure an Interface Policy for LLDP and LACP for North-South Traffic
- Create an External Routed Network
- Configure Subnets to Advertise to the External Firewall
- Create an Outbound Contract
- Create an Inbound Web Contract
- Apply Outbound and Inbound Contracts to the EPGs
- Create a Virtual Router and Security Zone for North-South Traffic
- Configure the Network Interfaces
- Configure Route Redistribution and OSPF
- Configure NAT for External Connections
-
-
- Choose a Bootstrap Method
- VM-Series Firewall Bootstrap Workflow
- Bootstrap Package
- Bootstrap Configuration Files
- Generate the VM Auth Key on Panorama
- Create the bootstrap.xml File
- Prepare the Licenses for Bootstrapping
- Prepare the Bootstrap Package
- Bootstrap the VM-Series Firewall on AWS
- Bootstrap the VM-Series Firewall on Azure
- Bootstrap the VM-Series Firewall on Azure Stack HCI
- Bootstrap the VM-Series Firewall on Google Cloud Platform
- Verify Bootstrap Completion
- Bootstrap Errors
Use Case: Secure the EC2 Instances in the AWS Cloud
In this example, the VPC is deployed in the
10.0.0.0/16 network with two /24 subnets: 10.0.0.0/24 and 10.0.1.0/24.
The VM-Series firewall will be launched in the 10.0.0.0/24 subnet
to which the internet gateway is attached. The 10.0.1.0/24 subnet
is a private subnet that will host the EC2 instances that need to
be secured by the VM-Series firewall; any server on this private
subnet uses NAT for a routable IP address (which is an Elastic IP
address) to access the internet. Use the Planning
Worksheet for the VM-Series in the AWS VPC to plan the design
within your VPC; recording the subnet ranges, network interfaces
and the associated IP addresses for the EC2 instances, and security
groups, will make the setup process easier and more efficient.
The following image depicts the logical flow of
traffic to/from the web server to the internet. Traffic to/from
the web server is sent to the data interface of the VM-Series firewall
that is attached to the private subnet. The firewall applies policy
and processes incoming/outgoing traffic from/to the internet gateway
of the VPC. The image also shows the security groups to which the
data interfaces are attached.
- Create a new VPC with a public subnet (or select an existing VPC).
- Log in to the AWS console and select theVPCDashboard.
- Verify that you’ve selected the correct geographic area (AWS region). The VPC will be deployed in the currently selected region.
- SelectStart VPC Wizard, and selectVPC with a Single Public Subnet.In this example, the IP CIDR block for the VPC is 10.0.0.0/16, the VPC name is Cloud DC, the public subnet is 10.0.0.0/24, and the subnet name is Cloud DC Public subnet. You will create a private subnet after creating the VPC.
- ClickCreate VPC.
- Create a private subnet.SelectSubnets, and clickCreate a Subnet. Fill in the information.In this example, theName tagfor the subnet is Web/DB Server Subnet, it is created in the Cloud Datacenter VPC and is assigned a CIDR block of 10.0.1.0/24.
- Create a new route table for each subnet.Although a main route table is automatically created on the VPC, we recommend creating new route tables instead of modifying the default route table.To direct outbound traffic from each subnet, you will add routes to the route table associated with each subnet, later in this workflow.
- Select.Route TablesCreate Route Table
- Add aName, for example CloudDC-public-subnet-RT, select theVPCyou created in Step 1, and clickYes, Create.
- Select the route table, clickSubnet Associationsand select the public subnet.
- SelectCreate Route Table.
- Add aName, for example CloudDC-private-subnet-RT, select theVPCyou created in Step 1, and clickYes, Create.
- Select the route table, clickSubnet Associationsand select the private subnet.
- Create Security Groups to restrict inbound/outbound internet access to the EC2 instances in the VPC.By default, AWS disallows communication between interfaces that do not belong to the same security group.SelectSecurity Groupsand click theCreate Security Groupbutton. In this example, we create three security groups with the following rules for inbound access:
- CloudDC-Management that specifies the protocols and source IP addresses that can connect to the management interface of the VM-Series firewall. At a minimum you need SSH, and HTTPS. In this example, we enable SSH, ICMP, HTTP, and HTTPS on the network interfaces that are attached to this security group.The management interface (eth 0/0) of the VM-Series firewall will be assigned to CloudDC-management-sg.
- Public-Server-CloudDC that specifies the source IP addresses that can connect over HTTP, FTP, SSH within the VPC. This group allows traffic from the external network to the firewall.The dataplane interface eth1/1 of the VM-Series firewall will be assigned to Public-Server-CloudDC.
- Private-Server-CloudDC that has very limited access. It only allows other EC2 instances on the same subnet to communicate with each other, and with the VM-Series firewall.The dataplane interface eth1/2 of the VM-Series firewall and the application in the private subnet will be attached to this security group.The following screenshot shows the security groups for this use case.
- Deploy the VM-Series firewall.Only the primary network interface that will serve as the management interface will be attached and configured for the firewall during the initial launch. The network interfaces required for handling data traffic will be added in Step 6.
- Create and attach virtual network interface(s), referred to as Elastic Network Interfaces (ENIs), to the VM-Series firewall. These ENIs are used for handling data traffic to/from the firewall.
- On the EC2 Dashboard, selectNetwork Interfaces, and clickCreate Network Interface.
- Enter a descriptive name for the interface.
- Select the subnet. Use the subnet ID to make sure that you have selected the correct subnet. You can only attach an ENI to an instance in the same subnet.
- Enter thePrivate IPaddress that you want to assign to the interface or selectAuto-assignto automatically assign an IP address within the available IP addresses in the selected subnet.
- Select theSecurity groupto control access to the network interface.
- ClickYes, Create.In this example, we create two interfaces with the following configuration:
- For Eth1/1 (VM-Series-Untrust)
- Subnet: 10.0.0.0/24
- Private IP:10.0.0.10
- Security group: Public-Server-CloudDC
- For Eth1/2 (VM-Series-Trust)
- Subnet: 10.0.1.0/24
- Private IP: 10.0.1.10
- Security group: Private-Server-CloudDC
- To attach the ENI to the VM-Series firewall, select the interface you just created, and clickAttach.
- Select theInstance IDof the VM-Series firewall, and clickAttach.
- Repeat steps 7 and 8 to attach the other network interface.
- Create an Elastic IP address and attach it to the firewall dataplane network interface that requires direct internet access.In this example, VM-Series_Untrust is assigned an EIP. The EIP associated with the interface is the publicly accessible IP address for the web server in the private subnet.
- SelectElastic IPsand clickAllocate New Address.
- SelectEC2-VPCand clickYes, Allocate.
- Select the newly allocated EIP and clickAssociate Address.
- Select theNetwork Interfaceand thePrivate IP addressassociated with the interface and clickYes, Associate.In this example, the configuration is:
- Disable Source/Destination check on each network interface attached to the VM-Series firewall. Disabling this attribute allows the interface to handle network traffic that is not destined to its IP address.
- Select the network interface in theNetwork Interfacestab.
- In theActiondrop-down, selectChange Source/Dest. Check.
- ClickDisabledandSaveyour changes.
- Repeat steps 1-3 for additional network interfaces, firewall-1/2 in this example.
- In the route table associated with the public subnet (from step 3), add a default route to the internet gateway for the VPC.
- From the VPC Dashboard, selectRoute Tablesand find the route table associated with the public subnet.
- Select the route table, selectRoutesand clickEdit.
- Add a route to forward packets from this subnet to the internet gateway. In this example, 0.0.0.0.0 indicates that all traffic from/to this subnet will use the internet gateway attached to the VPC.
- In the route table associated with the private subnet, add a default route to send traffic to the VM-Series firewall.Adding this route enables the forwarding of traffic from the EC2 instances in this private subnet to the VM-Series firewall.
- From the VPC Dashboard, selectRoute Tablesand find the route table associated with the private subnet.
- Select the route table, selectRoutesand clickEdit.
- Add a route to forward packets from this subnet to the VM-Series firewall network interface that resides on the same subnet. In this example, 0.0.0.0/0 indicates that all traffic from/to this subnet will use eni-abf355f2 (ethernet 1/2, which is CloudDC-VM-Series-Trust) on the VM-Series firewall.
- Configure a new administrative password for the firewall.An SSH tool such as PuTTY is required to access the CLI on the firewall and change the default administrative password. You cannot access the web interface until you SSH and change the default password.
- Use the public IP address you configured on the firewall, to SSH into the Command Line Interface (CLI) of the VM-Series firewall.You will need the private key that you used or created in Launch the VM-Series Firewall on AWS, steps 3-12 to access the CLI.
- Enter the following command to log in to the firewall:ssh-i<private_key_name>admin@<public-ip_address>
- Configure a new password, using the following command and follow the onscreen prompts:configureset mgt-config users admin passwordcommit
- Terminate the SSH session.
- Access the web interface of the VM-Series firewall.Open a web browser and enter the EIP of the management interface. For example: https://54.183.85.163
- Activate the licenses on the VM-Series firewall. This step is only required for the BYOL license; the usage-based licenses are automatically activated.See Activate the License.
- On the VM-Series firewall, configure the dataplane network interfaces on the firewall as Layer 3 interfaces.
- Select.NetworkInterfacesEthernet
- Click the link forethernet 1/1and configure as follows:
- Interface Type:Layer3
- Select theConfigtab, assign the interface to the default router.
- On theConfigtab, expand theSecurity Zonedrop-down and select New Zone. Define a new zone, for example untrust, and then click OK.
- Select IPv4, selectDHCP Client; the private IP address that you assigned to the network interface in the AWS management console will be acquired automatically.
- On thetab, expand the Management Profile drop-down, and selectAdvancedOther InfoNew Management Profile.
- Enter aNamefor the profile, such as allow_ping, and selectPingfrom the Permitted Services list, then clickOK.
- To save the interface configuration, clickOK.
- Click the link forethernet 1/2and configure as follows:
- Interface Type:Layer3
- Select theConfigtab, assign the interface to the default router.
- On theConfigtab, expand theSecurity Zonedrop-down and selectNew Zone. Define a new zone, for example trust, and then clickOK.
- SelectIPv4, selectDHCP Client.
- On theIPv4tab, clear theAutomatically create default route to default gateway provided by servercheck box. For an interface that is attached to the private subnet in the VPC, disabling this option ensures that traffic handled by this interface does not flow directly to the IGW on the VPC.
- On the, expand the Management Profile drop-down, and select the allow_ping profile you created earlier.AdvancedOther Info
- ClickOKto save the interface configuration.
- ClickCommitto save the changes. Verify that the Link state for the interface is up . If the link state is not up, reboot the firewall.
- On the VM-Series firewall, create Destination NAT and Source NAT rules to allow inbound/outbound traffic to/from the applications deployed within the VPC.
- Select.PoliciesNAT
- Create a Destination NAT rule that steers traffic from the firewall to the web server.
- ClickAdd, and enter a name for the rule. For example, NAT2WebServer.
- In theOriginal Packettab, make the following selections:
- Source Zone: untrust (where the traffic originates)
- Destination Zone: untrust (the zone for the firewall dataplane interface with which the EIP for the web server is associated.)
- Source Address: Any
- Destination Address: 10.0.0.10
- In theTranslated Packettab, select the Destination Address Translation check box and set theTranslated Address: to 10.0.1.62, which is the private IP address of the web server.
- ClickOK.
- Create a Source NAT rule to allow outbound traffic from the web server to the internet.
- ClickAdd, and enter a name for the rule. For example, NAT2External.
- In theOriginal Packettab, make the following selections:
- Source Zone: trust (where the traffic originates)
- Destination Zone: untrust (the zone for the firewall dataplane interface with which the EIP for the web server is associated.)
- Source Address: Any
- Destination Address: Any
- In theTranslated Packettab, make the following selections in the Source Address Translation section:
- Translation Type: Dynamic IP and Port
- Address Type: Translated Address
- Translated Address: 10.0.0.10 (the firewall dataplane interface in the untrust zone.)
- ClickOK.
- ClickCommitto save the NAT policies.
- On the VM-Series firewall, create security policies to manage traffic.Instead of entering a static IP address for the web server, use a dynamic address group. Dynamic address groups allow you to create policy that automatically adapts to changes so that you do not need to update the policy when you launch additional web servers in the subnet. For details, see Use Case: Use Dynamic Address Groups to Secure New EC2 Instances within the VPC.
- Select.PoliciesSecurityIn this example, we have four rules. A rule that allows management access to the firewall traffic, a rule to allow inbound traffic to the web server, a third rule to allow internet access to the web server, and in the last rule we modify a predefined intrazone-default rule to log all traffic that is denied.
- Create a rule to allow management access to the firewall.
- ClickAddand enter aNamefor the rule. Verify that theRule Typeis universal.
- In theSourcetab, add untrust as theSource Zone.
- In theDestinationtab, add trust as theDestination Zone.
- In theApplicationstab,Addping and ssh.
- In theActionstab, set theActionto Allow.
- ClickOK.
- Create a rule to allow inbound traffic to the web server.
- ClickAddand enter aNamefor the rule and verify that theRule Typeis universal.
- In theSourcetab, add untrust as theSource Zone.
- In theDestinationtab, add trust as theDestination Zone.
- In theApplicationstab,Addweb-browsing.
- In theService/URL Categorytab, verify that the service is set to application-default.
- In theActionstab, set theActionto Allow.
- In the Profile Settings section of theActionstab, selectProfilesand then attach the default profiles for antivirus, anti-spyware, and vulnerability protection.
- ClickOK.
- Create a rule to allow internet access to the web server.
- ClickAddand enter aNamefor the rule and verify that the Rule Type is universal.
- In theSourcetab, add trust as theSource Zone.
- In the Source Address section of theSourcetab, add 10.0.1.62, the IP address of the web server.
- In theDestinationtab, add untrust as theDestination Zone.
- In theService/URL Categorytab, verify that the service is set toapplication-default.
- In theActionstab, set theActionto Allow.
- In the Profile Settings section of theActionstab, selectProfilesand then attach the default profiles for antivirus, anti-spyware, and vulnerability protection.
- ClickOK.
- Edit the interzone-default rule to log all traffic that is denied. This predefined interzone rule is evaluated when no other rule is explicitly defined to match traffic across different zones.
- Select theinterzone-defaultrule and clickOverride.
- In theActionstab, selectLog at session end.
- ClickOK.
- Review the complete set of security rules defined on the firewall.
- ClickCommitto save the policies.
- Verify that the VM-Series firewall is securing traffic.
- Launch a web browser and enter the IP address for the web server.
- Log in to the web interface of the VM-Series firewall and verify that you can see the traffic logs for the sessions at.MonitorLogsTraffic
- Traffic inbound to the web server (arrives at EC2 instance in the AWS VPC):
- Traffic outbound from the web server (EC2 instance in the AWS VPC):
You have successfully deployed the VM-Series firewall as a cloud gateway!