Deployment Scenarios
The virtual firewall solution is useful in deployments where multiple firewalls are needed to protect traffic to and from the trusted networks. Although virtual firewalls can be deployed in many ways, for ease of understanding, we cover two design scenarios:
- Virtual firewall using two customer contexts
- Virtual firewall using a shared interface
Virtual Firewall Using Two Customer Contexts
SecureMe has an office in Brussels that provides firewall services to two small companies, Cubs and Bears. SecureMe's office is located in the same building as the offices of these companies. Cubs and Bears have specific requirements that SecureMe is obliged to meet. However, the appliance in Brussels has two active physical interfaces and, as a result, SecureMe wants to use subinterfaces to accommodate these customers. To conserve public addresses on the outside interfaces, the administrator uses a subnet mask of 255.255.255.248. Figure 9-5 shows SecureMe's new topology that will be set up in Brussels.
Figure 9-5 SecureMe Brussels Multimode Topology
The security requirements for SecureMe, along with Cubs and Bears, are as follows:
SecureMe security requirements:
- For SSH and Telnet user authentication, use a AAA server.
- Log all the system-generated messages to a syslog server.
Cubs security requirements:
- All hosts on 192.168.10.0/24 should be able to access the Internet.
- The source IP address should be translated to 209.165.200.230 using PAT.
- Allow HTTP clients from the Internet to access Cub's web server (192.168.5.10) on the DMZ network. This address should appear as 209.165.200.231 for the Internet users.
- Deny and log all other inbound traffic on the outside interface.
Bears security requirements:
- Allow hosts on the 192.168.20.0/24 subnet to access www.cisco.com only. All other web traffic should be blocked.
- The source IP address should be translated to 209.165.201.10 using interface PAT.
- Block and log all inbound traffic on the outside interface.
Example 9-17 shows the relevant configuration to achieve the goals just listed.
Example 9-17. ASA's Relevant Configuration with Multiple Security Contexts
System Execution Space Brussels# show run ASA Version 7.0(1) <system> ! Main GigabitEthernet0/0 interface interface GigabitEthernet0/0 ! Sub-interface assigned to the admin context as the inside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/0.1 vlan 5 ! Sub-interface assigned to the Cubs context as the inside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/0.2 vlan 10 ! Sub-interface assigned to the Bears context as the inside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/0.3 vlan 20 ! Main GigabitEthernet0/1 interface interface GigabitEthernet0/1 ! Sub-interface assigned to the admin context as the outside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/1.1 vlan 101 ! Sub-interface assigned to the Cubs context as the outside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/1.2 vlan 110 ! Sub-interface assigned to the Bears context as the outside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/1.3 vlan 120 ! Sub-interface assigned to the Cubs context as the DMZ interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/1.5 vlan 130 ! hostname Brussels ! context named "admin" is the designated Admin context admin-context admin ! "admin" context definition along with the allocated interfaces. context admin description admin Context for admin purposes allocate-interface GigabitEthernet0/0.1 allocate-interface GigabitEthernet0/1.1 config-url disk0:/admin.cfg ! "Cubs" context definition along with the allocated interfaces. context Cubs description Cubs Customer Context allocate-interface GigabitEthernet0/0.2 allocate-interface GigabitEthernet0/1.2 allocate-interface GigabitEthernet0/1.5 config-url disk0:/Cubs.cfg ! "Bears" context definition along with the allocated interfaces. context Bears description Bears Customer Context allocate-interface GigabitEthernet0/0.3 allocate-interface GigabitEthernet0/1.3 config-url disk0:/Bears.cfg ______________________________________________________________________________ Admin Context Brussels/admin# show running ASA Version 7.0(1) <context> !inside interface of the admin context with security level set to 100 interface GigabitEthernet0/0.1 nameif inside security-level 100 ip address 192.168.1.1 255.255.255.0 !outside interface of the admin context with security level set to 0 interface GigabitEthernet0/1.1 nameif outside security-level 0 ip address 209.165.202.130 255.255.255.248 ! hostname admin !configuration of a syslog server with logging level set to emergencies with timestamp logging enable logging timestamp logging trap emergencies logging host inside 192.168.1.10 ! route outside 0.0.0.0 0.0.0.0 209.165.202.129 1 !configuration of a AAA server using RADIUS for authentication aaa-server uauth protocol radius aaa-server uauth host 192.168.1.20 key cisco123 !setting up telnet and SSH authentication aaa authentication telnet console uauth aaa authentication ssh console uauth !Telnet to the admin context is allowed from the inside interface telnet 192.168.1.0 255.255.255.0 inside telnet timeout 5 !SSH to the admin context is allowed from the outside interface ssh 0.0.0.0 0.0.0.0 outside ssh timeout 5 ______________________________________________________________________________ Cubs Context Brussels/Cubs# show running ASA Version 7.0(1) <context> !inside interface of the Cubs context with security level set to 100 interface GigabitEthernet0/0.2 nameif inside security-level 100 ip address 192.168.10.1 255.255.255.0 !outside interface of the Cubs context with security level set to 0 interface GigabitEthernet0/1.2 nameif outside security-level 0 ip address 209.165.200.225 255.255.255.248 !DMZ interface of the Cubs context with security level set to 50 interface GigabitEthernet0/1.5 nameif dmz security-level 50 ip address 192.168.5.1 255.255.255.0 ! hostname Cubs !Access-list configuration to allow web traffic. The access-list is applied to the outside interface. access-list outside-in extended permit tcp any host 209.165.200.231 eq www access-list outside-in extended deny ip any any log access-group outside-in in interface outside !NAT configuration to allow inside hosts to get Internet connectivity global (outside) 1 209.165.200.230 nat (inside) 1 192.168.10.0 255.255.255.0 !Static address translation for the Web-Server static (dmz,outside) 209.165.200.231 192.168.5.10 netmask 255.255.255.255 ! route outside 0.0.0.0 0.0.0.0 209.165.200.226 1 ______________________________________________________________________________ Bears Context Brussels/Bears# show running ASA Version 7.0(1) <context> !inside interface of the Bears context with security level set to 100 interface GigabitEthernet0/0.3 nameif inside security-level 100 ip address 192.168.20.1 255.255.255.0 !outside interface of the Bears context with security level set to 0 interface GigabitEthernet0/1.3 nameif outside security-level 0 ip address 209.165.201.2 255.255.255.224 ! enable password 8Ry2YjIyt7RRXU24 encrypted passwd 2KFQnbNIdI.2KYOU encrypted hostname Bears !Access-list configuration to permit web traffic initiated from the inside host and destined to 198.133.219.25. Deny all other traffic. The access-list is applied to the inside interface. access-list inside-in extended permit tcp 192.168.20.0 255.255.255.0 host 198.133.219.25 eq 80 access-group inside-in in interface inside !Access-list configuration to deny and log all inbound traffic. The access-list is applied to the outside interface access-list outside-in extended deny ip any any log access-group outside-in in interface outside !NAT configuration to allow inside hosts to get Internet connectivity global (outside) 1 interface nat (inside) 1 192.168.20.0 255.255.255.0 ! route outside 0.0.0.0 0.0.0.0 209.165.201.1 1
Virtual Firewall Using a Shared Interface
An educational institute contacts SecureMe to provide firewall services for two of its departments—faculty and students—over a shared outside interface. The hosts in the student context are allowed to access a web server in the faculty context. Additionally, they are allowed to check their e-mail messages from 209.165.202.130. The faculty context, on the other hand, does not restrict anything going out to the Internet.
The SecureMe global policy restricts access of the security appliance to the valid and authorized users on the AAA servers. SecureMe does not have many public addresses available, so it is using interface PAT for address translation. Additionally, SecureMe does not want the administrators of the individual security contexts to be able to determine the interface assignment for their contexts. Figure 9-6 shows SecureMe's proposed topology for this institute.
Figure 9-6 Security Contexts Using a Shared Interface
Example 9-18 shows the relevant configuration for the Cisco ASA used in this deployment.
Example 9-18. ASA's Relevant Configuration Using a Shared Outside Interface
System Execution Space SecuremeInstitute# show run ASA Version 7.0(1) <system> ! Main GigabitEthernet0/0 interface interface GigabitEthernet0/0 ! Sub-interface assigned to the admin context as the inside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/0.1 vlan 5 ! Sub-interface assigned to the Students context as the inside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/0.2 vlan 10 ! Sub-interface assigned to the Faculty context as the inside interface. A VLAN ID is !assigned to the interface interface GigabitEthernet0/0.3 vlan 20 ! Main GigabitEthernet0/1 interface to be used as the shared interface interface GigabitEthernet0/1 ! hostname SecuremeInstitute ! context named "admin" is the designated Admin context admin-context admin ! "admin" context definition along with the allocated interfaces. context admin description admin Context for admin purposes allocate-interface GigabitEthernet0/0.1 inside invisible allocate-interface GigabitEthernet0/1 outside invisible config-url disk0:/admin.cfg ! "Students" context definition along with the allocated interfaces. context Students description Students Customer Context allocate-interface GigabitEthernet0/0.2 S_inside invisible allocate-interface GigabitEthernet0/1 S_outside invisible config-url disk0:/Students.cfg ! "Faculty" context definition along with the allocated interfaces. context Faculty description Faculty Customer Context allocate-interface GigabitEthernet0/0.3 F_inside invisible allocate-interface GigabitEthernet0/1 F_outside invisible config-url disk0:/Faculty.cfg ________________________________________________________________________ Admin Context SecuremeInstitute/admin# show running ASA Version 7.0(1) <context> !inside interface of the admin context with security level set to 100 interface inside nameif inside security-level 100 ip address 192.168.1.1 255.255.255.0 !outside interface of the admin context with security level set to 0 interface outside nameif outside security-level 0 ip address 209.165.200.225 255.255.255.224 ! hostname admin ! route outside 0.0.0.0 0.0.0.0 209.165.200.230 1 !configuration of a AAA server using RADIUS for authentication aaa-server uauth protocol radius aaa-server uauth host 192.168.1.20 key cisco123 aaa authentication telnet console uauth aaa authentication ssh console uauth !Telnet to the admin context is allowed from the inside interface telnet 192.168.1.0 255.255.255.0 inside telnet timeout 5 !SSH to the admin context is allowed from the outside interface ssh 0.0.0.0 0.0.0.0 outside ssh timeout 5 route outside 0.0.0.0 0.0.0.0 209.165.200.225 1 _________________________________________________________________________ Students Context SecuremeInstitute/Students# show running ASA Version 7.0(1) <context> !inside interface of the Students context with security level set to 100 interface S_inside nameif inside security-level 100 ip address 192.168.10.1 255.255.255.0 !outside interface of the Students context with security level set to 0 interface S_outside nameif outside security-level 0 ip address 209.165.200.226 255.255.255.224 !Access-list configuration to allow email and web traffic. The access-list is applied to the inside interface. access-list inside-in extended permit tcp 192.168.10.0 255.255.255.0 host 209.165.202.130 eq smtp access-list inside-in extended permit tcp 192.168.10.0 255.255.255.0 host 209.165.200.230 eq www access-group inside-in in interface S_inside ! hostname Students !NAT configuration to allow inside hosts to get Internet connectivity global (S_outside) 1 interface nat (S_inside) 1 192.168.10.0 255.255.255.0 ! route S_outside 0.0.0.0 0.0.0.0 209.165.200.225 1 ___________________________________________________________________________ Faculty Context SecuremeInstitute/Faculty# show running ASA Version 7.0(1) <context> !inside interface of the Faculty context with security level set to 100 interface F_inside nameif inside security-level 100 ip address 192.168.20.1 255.255.255.0 !outside interface of the Faculty context with security level set to 0 interface F_outside nameif outside security-level 0 ip address 209.165.200.227 255.255.255.224 ! enable password 8Ry2YjIyt7RRXU24 encrypted passwd 2KFQnbNIdI.2KYOU encrypted hostname Faculty !Access-list configuration to allow web traffic. The access-list is applied to the outside interface. access-list outside-in extended permit tcp host 209.165.200.226 host 209.165.200.230 eq www access-group outside-in in interface F_outside !NAT configuration to allow inside hosts to get Internet connectivity global (F_outside) 1 interface nat (F_inside) 1 192.168.20.0 255.255.255.0 !Static address translation for the Web-Server static (F_inside,F_outside) 209.165.200.230 192.168.20.20 netmask 255.255.255.255 ! route F_outside 0.0.0.0 0.0.0.0 209.165.200.225 1