Home > Articles > Cisco Network Technology > General Networking > Cisco ASA Security Contexts

Cisco ASA Security Contexts

  • Sample Chapter is provided courtesy of Cisco Press.
  • Date: Dec 16, 2005.

Chapter Description

The virtual firewall methodology enables a physical firewall to be partitioned into multiple standalone firewalls. Each standalone firewall acts and behaves as an independent entity with its own configuration, interfaces, security policies, routing table, and administrators. In Cisco ASA, these virtual firewalls are known as security contexts. This chapter covers security contexts in detail.

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.

09fig05.gif

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.

09fig06.gif

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
4. Monitoring and Troubleshooting the Security Contexts | Next Section Previous Section

Cisco Press Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Cisco Press and its family of brands. I can unsubscribe at any time.

Overview

Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Cisco Press products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@ciscopress.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security

Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children

This site is not directed to children under the age of 13.

Marketing

Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out

Users can always make an informed choice as to whether they should proceed with certain services offered by Cisco Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.ciscopress.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links

This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020