cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10623
Views
0
Helpful
29
Replies

Allowing External Traffic on Cisco ASA

jweier_elys
Level 1
Level 1

Hi - I have a Cisco ASA and I'm really struggling with something very simple. I have an outside interface and I would like to allow traffic to hit the outside interface on TCP Port 81 and get NAT'd to a private IP on a webserver. I believe I have the NAT piece of the equation solved but the ACL is processed first and I can't figure out the ACL for the life of me. Here's what I have:

 

On the outside interface, I created an incoming rule with any source, any destination and a service of TCP Port 81. However, when I run a Packet Tracer from any public IP to the IP of the outside interface on Port 81 the packet is dropped via an implicit rule. 

 

I'm running ASA 9.9, thoughts?PacketTracer.png

 

Rule.pngInterfaces.pngPacketTracer.png

1 Accepted Solution

Accepted Solutions

you have not change the nat rules put in this order

 

no nat (inside,outside) source static SERVER interface service CUSTOM80 CUSTOM81
nat (inside,outside) source static SERVER interface service CUSTOM81 CUSTOM80
!

no access-list outside_access_in extended permit tcp any object SERVER eq 80
access-list outside_access_in extended permit tcp any object SERVER eq 81
access-group outside_access_in in interface outside

!

packet-tracer input outside tcp 8.8.8.8 81 96.89.224.197 80

====================================================================

This is the config you just put them earlier change them as describe above. I test them in lab enviroment you should be ok now.

Manual NAT Policies (Section 1)
1 (inside) to (outside) source static Utility1 interface service CUSTOM80 CUSTOM81

please do not forget to rate.

View solution in original post

29 Replies 29

Hi,
Not 100% sure of your exact configuration, but you would specify the real IP address and port in the ACL. See example:-

object nat SRV1
host 10.2.2.5
nat (inside,outside) static 96.89.224.197 service tcp 80 81
access-list OUTSIDE_IN permit tcp any host 10.2.2.5 eq 80

HTH

You need this.

object network SERVER
 host 10.2.2.5
 nat (inside,outside) static interface service tcp 80 81
!
access-list outside_in permit tcp any host 10.2.2.5 eq 80
access-group outside_in in interface outside
!
packet tracer input outside tcp 8.8.8.8 1234 10.2.2.5 eq 81
!

please do not forget to rate.

So, unfortunately I'm having trouble with the NAT statement you suggested. I think via my Googling I've found that 8.3+ requires a new NAT format and syntax. Here is what I typed to try to get it as close to yours as possible:

 

nat (inside,outside) source static any interface service Port80 Port81

 

I had to create Service Objects as it wouldn't let me specify the port explicitly. I also had to add the source parameter before the word static.

 

Unfortunately, even with this command and the the access-list/access-group commands I still get dropped packets via an implicit rule.

 

Config snippets:

 

nat (inside,outside) source static any any destination static NETWORK_OBJ_10.1.2.0_26 NETWORK_OBJ_10.1.2.0_26 no-proxy-arp route-lookup
nat (inside,outside) source dynamic obj_any interface
nat (wlan,outside) source dynamic obj_any interface
nat (inside,outside) source static any interface service Port80 Port81

 

object service Port80
service tcp source eq www destination eq www

 

object service Port81
service tcp destination eq 81

 

access-list outside_in extended permit tcp any host 10.1.1.79 eq www

 

access-group outside_access_out out interface outside
access-group inside_access_in_1 in interface inside
access-group inside_access_out_1 out interface inside
access-group wlan_access_in_1 in interface wlan
access-group wlan_access_out out interface wlan

 

I've attached the entire config file if that would be more helpful.

 

Thanks!

You've defined your nat statement globally, rather than under the object "Utility1", the ACL is also wrong, you need to reference the real port not the natted port. Example:-

object network Utility1
host 10.1.1.79
nat (INSIDE,OUTSIDE) static interface service tcp www 81

access-list outside_access_in extended permit tcp any object Utility1 eq 80

You don't have an access-group inbound on the outside interface. E.g-

"access-group outside_access_in in interface outside"

Remove the old configuration:-
no access-list outside_access_in extended permit tcp any host 10.1.1.79 range 81 81
no nat (inside,outside) source static any interface service Port80 Port81

@Rob Ingram
is that typo error
access-list outside_access_in extended permit tcp any object Utility1 10.1.1.79 eq 80
                                                                                               <-------------->

please do not forget to rate.

Good spot, amended original post

Hi - Unfortunately that didn't seem to make a difference. My packet-tracer still fails with an implicit rule drop.

 

Here are the snippets from my config:

 

object network Utility1
host 10.1.1.79

access-list outside_access_in extended permit tcp any object Utility1 eq www

object network Utility1
nat (inside,outside) static interface service tcp www 81

access-group outside_access_in in interface outside

 

Thoughts?

If you provide the output of the packet-tracer (run it from the CLI) we might be able to determine what the issue is.
My guess is possibly there is another NAT rule above the new NAT rule which it is matching against and therefore failing.

You could also run "show nat" and check the output

Hey - Below is my show NAT and the packet tracer output. Thanks again for all of the help!

 

ciscoasa(config)# show nat
Manual NAT Policies (Section 1)
1 (inside) to (outside) source static any any destination static NETWORK_OBJ_10.1.2.0_26 NETWORK_OBJ_10.1.2.0_26 no-proxy-arp route-lookup
translate_hits = 818, untranslate_hits = 881
2 (inside) to (outside) source dynamic obj_any interface
translate_hits = 292844, untranslate_hits = 14867
3 (wlan) to (outside) source dynamic obj_any interface
translate_hits = 4092438, untranslate_hits = 308198

Auto NAT Policies (Section 2)
1 (inside) to (outside) source static Utility1 interface service tcp www 81
translate_hits = 0, untranslate_hits = 0
2 (any) to (outside) source dynamic obj_any interface
translate_hits = 15869, untranslate_hits = 0

 


ciscoasa# packet-tracer input outside tcp 8.8.8.8 1234 10.1.1.79 81

Phase: 1
Type: ROUTE-LOOKUP
Subtype: Resolve Egress Interface
Result: ALLOW
Config:
Additional Information:
found next-hop 10.1.1.79 using egress ifc inside

Phase: 2
Type: ACCESS-LIST
Subtype:
Result: DROP
Config:
Implicit Rule
Additional Information:

Result:
input-interface: outside
input-status: up
input-line-status: up
output-interface: inside
output-status: up
output-line-status: up
Action: drop
Drop-reason: (acl-drop) Flow is denied by configured rule

ciscoasa#

It's probably being natted on this rule:-

 

Manual NAT Policies (Section 1)
1 (inside) to (outside) source static any any destination static NETWORK_OBJ_10.1.2.0_26 NETWORK_OBJ_10.1.2.0_26 no-proxy-arp route-lookup
translate_hits = 818, untranslate_hits = 881
2 (inside) to (outside) source dynamic obj_any interface
translate_hits = 292844, untranslate_hits = 14867

 

which would be processed before the new nat rule

 

Auto NAT Policies (Section 2)
1 (inside) to (outside) source static Utility1 interface service tcp www 81
translate_hits = 0, untranslate_hits = 0

 

Try removing the Manual NAT rule #2, and configure a global nat rule that would be processed after the Auto NAT rules, this would move the rule to Section 3. e.g:-

 

nat (INSIDE,OUTSIDE) after-auto source dynamic obj_any interface interface

corret if you apply these it will work and fix your issue

 

 

object network SERVER
 host 10.1.1.79
!
nat (inside,outside) 1 source static SERVER interface service Port80 Port81

!

please do not forget to rate.

@Rob Ingramwhy you putting the rule in section 3. it should be in section 1.

 

object network SERVER
 host 10.1.1.79
!
nat (inside,outside) 1 source static SERVER interface service Port80 Port81

!

please do not forget to rate.

Unfortunately, neither of the new NAT rules worked using the after-auto or "1" command to specify the order. I still get the same results of a dropped packet via an implicit rule. I also don't see any hits on the NAT rule or ACL. It's my understanding that the ACL is processed before the NAT rule so I'm wondering if that's where the issue resides...there has to be something I'm missing though...

 

Updated NAT table and packet-tracer below:

 

ciscoasa# show nat

Manual NAT Policies (Section 1)
1 (inside) to (outside) source static any any destination static NETWORK_OBJ_10.1.2.0_26 NETWORK_OBJ_10.1.2.0_26 no-proxy-arp route-lookup
translate_hits = 818, untranslate_hits = 881
2 (wlan) to (outside) source dynamic obj_any interface
translate_hits = 4103849, untranslate_hits = 314450

Auto NAT Policies (Section 2)
1 (inside) to (outside) source static Utility1 interface service tcp www 81
translate_hits = 0, untranslate_hits = 0
2 (any) to (outside) source dynamic obj_any interface
translate_hits = 15919, untranslate_hits = 4

Manual NAT Policies (Section 3)
1 (inside) to (outside) source dynamic obj_any interface
translate_hits = 0, untranslate_hits = 0

 

 

 

ciscoasa# packet-tracer input outside tcp 8.8.8.8 1234 10.1.1.79 81

Phase: 1
Type: ROUTE-LOOKUP
Subtype: Resolve Egress Interface
Result: ALLOW
Config:
Additional Information:
found next-hop 10.1.1.79 using egress ifc inside

Phase: 2
Type: ACCESS-LIST
Subtype:
Result: DROP
Config:
Implicit Rule
Additional Information:

Result:
input-interface: outside
input-status: up
input-line-status: up
output-interface: inside
output-status: up
output-line-status: up
Action: drop
Drop-reason: (acl-drop) Flow is denied by configured rule

Your packet-tracer syntax was to the private ip address of the server not the public ip address. Change that and try again.
Did you actually test accessing the server over the internet?

Can you provide the updated configuration acl, nat, objects etc.
Review Cisco Networking for a $25 gift card