Networks Training

  • About
  • My Books
  • IP Tools
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • Tech News
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / Cisco ASA Firewall Configuration / How can we allow whole traffic in ASA from inside to outside

How can we allow whole traffic in ASA from inside to outside

Edited By Harris Andrea

This is a question that I get from time to time in my work environment either from colleagues or customers. I will show you a couple of ways to do this.

In ASA, for traffic to pass through interfaces, several conditions must be met. Since we are talking here for inside and outside interfaces, this means from higher security level (inside) to lower security level (outside). The most important conditions to examine here is the NAT (if used) and the access control list. Lets see more details below:

Traffic from inside to outside using NAT

This is the most common scenario. NAT is most commonly used in real networks to hide the internal network range and to translate the non-routable private addresses (internal network) to publicly routable IP addresses on the outside.

We can have two types of NAT:

  1. Dynamic NAT (with Port Address Translation – PAT being a subcategory of this)
  2. Static NAT (internal addresses are permanently mapped to external public addresses)

Here we will examine the most common scenario which is PAT. This is a many-to-one translation which allows us to translate all internal IP addresses into a single public IP address which is assigned to us by the ISP and exists on the outside of the ASA.

MORE READING:  How to Pass BGP Sessions through Cisco ASA Firewall (BGP Pass Through)

For ASA to keep track of all these many-to-one translations, it uses port numbers. A different port number (out of the range of 65000) is assigned to a different internal IP address.

Lets see the configuration for allowing all traffic from inside to outside using PAT:

Assume the following:

inside LAN range: 192.168.1.0/24
Public IP addresses available: 100.100.100.1 – 100.100.100.32
ASA outside interface IP address: 100.100.100.1

Option1:

Using the ASA interface IP (100.100.100.1) to translate all internal addresses:

ciscoasa(config)# nat (inside) 1 192.168.1.0 255.255.255.0
ciscoasa(config)# global (outside) 1 interface

Commands for ASA version 8.3 and later:

ciscoasa(config)# object network internal_lan
ciscoasa(config-network-object)# subnet 192.168.1.0 255.255.255.0
ciscoasa(config-network-object)# nat (inside,outside) dynamic interface

Option2:

Using one of the other available public IP addresses for translation:

ciscoasa(config)# nat (inside) 1 192.168.1.0 255.255.255.0
ciscoasa(config)# global (outside) 1 100.100.100.2 netmask 255.255.255.255

Commands for ASA version 8.3 and later:

ciscoasa(config)# object network internal_lan
ciscoasa(config-network-object)# subnet 192.168.1.0 255.255.255.0
ciscoasa(config-network-object)# nat (inside,outside) dynamic 100.100.100.2

After taking care of the NAT commands, we need to see our access-list commands. By default, if you don’t have an access-list applied on the inside interface, then all traffic is allowed to pass because the inside is the highest security level (100).

MORE READING:  Cisco ASA 5500 new software 8.2 released

However, if for any reason you apply an access-list to the inside interface, then you must explicitly allow all IP traffic to pass using the ACL.

ciscoasa(config)#access-list INSIDE_IN extended permit ip any any
ciscoasa(config)# access-group INSIDE_IN in interface inside

Traffic from inside to outside without NAT

There are some cases where we don’t want to have NAT between inside to outside. In this scenario, the ASA works like a router but it still applies firewall inspection to the traffic. All you have to do here is to disable NAT and then allow traffic with an ACL:

ciscoasa(config)#no nat-control
ciscoasa(config)#access-list INSIDE_IN extended permit ip any any
ciscoasa(config)# access-group INSIDE_IN in interface inside

Thats it.

Spread the love

Related Posts

  • Prevent Spoofing Attacks on Cisco ASA using RPF
  • Configuring Connection Limits on Cisco ASA Firewalls – Protect from DoS
  • Configuring AAA Authentication-Authorization-Accounting on Cisco ASA Firewall (TACACS+, RADIUS)
  • Cisco ASA Firewall Management Interface Configuration (with Example)
  • How to Configure Access Control Lists on a Cisco ASA 5500/5500-X Firewall (with Examples)

Filed Under: Cisco ASA Firewall Configuration

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

By subscribing to our email list you will be receiving technical tutorials and industry news from time-to-time. You can unsubscribe at any time.

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books ("Cisco ASA Firewall Fundamentals" and "Cisco VPN Configuration Guide") which are available at Amazon and on this website as well.

Comments

  1. Brando says

    March 7, 2012 at 6:04 pm

    Great post, but I have a question. What about if you want to make one internal resource available? (i.e want to be able to RDP into a system behind the ASA).

    I have used a static NAT:

    static (inside,outside) 100.100.100.2 192.168.1.28 netmask 255.255.255.255

    access-list OUTSIDE extended permit tcp any host 100.100.100.2 eq 3389

    When I view the logs it is reporting the following:

    Inbound TCP connection denied from 206.100.100.1 to 100.100.100.2 /3389 flags SYN on interface outside.

    Been pulling my hair out with this one as I believe I have everything configured correctly. New to the world of ASA’s so be nice :)

  2. Blog Admin says

    March 7, 2012 at 6:57 pm

    Brando,

    What ASA software version are you running? If its lower than 8.3, then your configuration with static nat is correct. However, have you attached the OUTSIDE access list to the outside interface? See below:

    access-group OUTSIDE in interface outside

  3. Brando says

    March 7, 2012 at 8:45 pm

    I am running 8.2 (1).

    I just tried the command you tried. Looks like it is working – thank you. what is the difference between the capitalized OUTSIDE and the lower case one?

  4. Brando says

    March 7, 2012 at 8:54 pm

    Again thanx for the help!

    If I wanted to harden up the security and only allow a specific outside user to access this RDP system would the command be:

    access-list OUTSIDE extended permit tcp A.B.C.D 100.100.100.2 eq 3389

    The A.B.C.D being a specific public address.

    BC

  5. Blog Admin says

    March 10, 2012 at 11:37 am

    Yes Brando, that’s correct, but the actual command would be:

    access-list OUTSIDE extended permit tcp host A.B.C.D host 100.100.100.2 eq 3389

    cheers

  6. Blog Admin says

    March 10, 2012 at 11:38 am

    Brando,

    The capitalized OUTSIDE is the name of the access-list, and the lower case one in the name of the interface

  7. DJ says

    February 8, 2017 at 12:10 am

    Hi, I am extremely new to networking with not much experience. We have a Cisco ASA 5510 Firewall and would like to use it for following purpose:

    1. Use it like a router with internet connection from Optus coming in.
    2. Link it with our existing network, so any PC connected to the ASA can get internet connection plus the network devices.
    3. Setup VPN, so people can connect remotely through this firewall.

    Can I achieve all of the above? If yes, how? Any help would be greatly appreciated. Thanks.

    DJ

  8. Harris Andrea says

    February 8, 2017 at 5:46 am

    DJ,

    of course you can achieve all the above with a Cisco ASA 5510 firewall (and much more actually).

    Here are some tutorials I have written that might be helpful:

    For tasks 1,2 see this link:
    https://www.networkstraining.com/how-to-configure-a-cisco-asa-5510-firewall-basic-configuration-tutorial/

    For task 3 see this:
    https://www.networkstraining.com/how-to-configure-anyconnect-ssl-vpn-on-cisco-asa-5500/

    Harris

  9. mayrah says

    March 4, 2019 at 8:00 am

    Great!

    so helpfull. thank you guys

  10. Harris Andrea says

    March 4, 2019 at 11:36 am

    I’m glad you liked my article and that it helped you.

    Have a great day

    Harris

  11. Gamal Yahaya Djamadar says

    April 10, 2024 at 4:42 am

    ASA Version 9.6(1)
    !
    hostname ciscoasa
    names
    !
    interface GigabitEthernet1/1
    nameif inside
    security-level 100
    ip address 192.168.1.1 255.255.255.0
    !
    interface GigabitEthernet1/2
    nameif outside
    security-level 0
    ip address 8.8.8.4 255.0.0.0
    !
    interface GigabitEthernet1/3
    no nameif
    no security-level
    no ip address
    shutdown
    !
    interface GigabitEthernet1/4
    no nameif
    no security-level
    no ip address
    shutdown
    !
    interface GigabitEthernet1/5
    no nameif
    no security-level
    no ip address
    shutdown
    !
    interface GigabitEthernet1/6
    no nameif
    no security-level
    no ip address
    shutdown
    !
    interface GigabitEthernet1/7
    no nameif
    no security-level
    no ip address
    shutdown
    !
    interface GigabitEthernet1/8
    no nameif
    no security-level
    no ip address
    shutdown
    !
    interface Management1/1
    management-only
    no nameif
    no security-level
    no ip address
    shutdown
    !
    object network LAN
    subnet 192.168.1.0 255.255.255.0
    nat (inside,outside) dynamic interface
    object network vlan10
    subnet 10.0.10.0 255.255.255.0
    nat (inside,outside) dynamic interface
    object network vlan20
    subnet 10.0.20.0 255.255.255.0
    nat (inside,outside) dynamic interface
    !
    route outside 0.0.0.0 0.0.0.0 8.8.8.6 1
    route inside 10.0.20.0 255.255.255.0 192.168.1.100 1
    route inside 10.0.10.0 255.255.255.0 192.168.1.100 1
    !
    access-list Internal_access_in extended permit ip 192.168.1.0 255.255.255.0 any
    access-list Internal_access_in extended permit ip 10.0.10.0 255.255.255.0 any
    access-list Internal_access_in extended permit ip 10.0.20.0 255.255.255.0 any
    access-list External_access_in extended permit ip any 192.168.1.0 255.255.255.0
    access-list External_access_in extended permit icmp any any echo-reply
    access-list External_access_in extended permit icmp any any
    !
    !
    access-group Internal_access_in in interface inside
    access-group External_access_in in interface outside
    !
    !
    class-map inspection_default
    match default-inspection-traffic
    !
    policy-map type inspect dns preset_dns_map
    parameters
    message-length maximum 512
    policy-map global_policy
    class inspection_default
    inspect dns preset_dns_map
    inspect ftp
    inspect icmp
    inspect tftp
    !
    service-policy global_policy global
    !
    telnet timeout 5
    ssh timeout 5
    !
    dhcpd dns 8.8.8.8
    dhcpd lease 3000
    !
    dhcpd address 192.168.1.5-192.168.1.15 inside
    dhcpd enable inside
    !
    !
    !
    !
    router eigrp 10
    network 192.168.1.0
    network 8.0.0.0
    !
    ciscoasa#

    vlan 10 and vlan 20 can’t ping 8.8.8.6…..

  12. Harris Andrea says

    April 11, 2024 at 10:51 am

    How about within the ASA firewall? Can you ping 8.8.8.6 from within the ASA firewall?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this site

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2026 | Privacy Policy | Terms and Conditions | Contact | Amazon Disclaimer | Delivery Policy