Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

ASA port translation (PAT) Issue

Hi,
I have a strange issue with PAT in Cisco ASA 5540 running Version 8.0(5).

We have a web server (172.16.20.8) which is in DMZ listening port 90. If anyone access from outside to the website on port 80 the ASA should translate the port on 90. So I execute the command as follows.

"static (DMZ,outside) tcp 125.145.215.185 www 172.16.20.8 90 netmask 255.255.255.255"

Also I enabled the access-list in outside interface

"access-list outside_access_in extended permit tcp any host 125.145.215.185 eq www"

This time the website is not accessing from outside, showing error " The IE cannot display the webpage"

When I ADD the following configuration to ASA, it is working.

"static (DMZ,outside) 125.145.215.185 172.16.20.8 netmask 255.255.255.255" ( A direct nat applied. ASA showing a warning that there is conflict with existing PAT, but i ignored the warning)

Also I have added access-list in outside interface - "access-list outside_access_in extended permit tcp any host 125.145.215.185 eq 90"

ASA5540# show xlate -
"PAT Global 125.145.215.185(80) Local 172.16.20.8(90)"
"Global 125.145.215.185 Local 172.16.20.8"

Now the website can access from outside.But can see the translated port on the address bar.

What I understand from the troubleshooting is the packets are going to webserver without any translation.

How can I resolve this issue, Please advice.

Thanks
GK

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: ASA port translation (PAT) Issue

Don't use port 90 to test. Use port 8080.

39 REPLIES
Cisco Employee

Re: ASA port translation (PAT) Issue

1) Is 125.145.215.185 the ASA outside interface ip address, or a different ip address to the ASA outside IP?

2) Also, did you perform a "clear xlate local 172.16.20.8" or "clear xlate" in general after configuring the port address translation?

New Member

Re: ASA port translation (PAT) Issue

Hi,

Thank you for the message.

Answer for,

Q 1. The concern IP -125.145.215.185 is not an interface IP. It is a different ip address in our public ip address range and never used for our any other translation.

Q2. Clear Xlate command has been issued so many times whenever I do this configuration changes.

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

Thanks GK.

When the following translation is used:

"static (DMZ,outside) tcp  125.145.215.185 www 172.16.20.8 90 netmask 255.255.255.255"

Do you see any increase in hitcount on your ACL when you tried to initiate the connection multiple times:

access-list outside_access_in  extended permit tcp any host 125.145.215.185 eq www

New Member

Re: ASA port translation (PAT) Issue

Hi,

Thank you for the response.

Yes I saw the hitcount on the following access list BEFORE I do the configuration changes.

access-list outside_access_in  extended permit tcp any host 125.145.215.185 eq www.

But now I can't see any hitcount on the above access list, instead I can see the hitcount on following access list.

access-list outside_access_in  extended permit tcp any host 125.145.215.185 eq 90 (hitcnt=15)

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

Not sure whether it's working. I just tested to browse to http://125.145.215.185:90, but it's not connecting at all.

New Member

Re: ASA port translation (PAT) Issue

Hi,

Sorry Halijenn,

I forget to tell you the public IP which I posted in this discussions is not real one, because some security reasons I can't explore the IP. It is a military web site and it is not yet published so far. SO please excuse me.

I am sure that the web site is working from outside and getting the hit count to access list which is equal to tcp 90.

Do you think any other issue is still existing?

Please advice.

Thank you

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

The warning that you ignored may be causing this to fail. Remove this line (port 80 to 90) and add it again and copy and paste the message that you get when you do this.

Need the output of

sh run static | i 125.145.215.185

sh run global

-KS

New Member

Re: ASA port translation (PAT) Issue

Hi,

Here is the warning message when I create additional static nat translation.

ASA5540(config)#static (dmz,outside) 125.145.215.185 172.16.20.8 netmask 255.255.255.255

WARNING: mapped-address conflict with existing static

  TCP dmz:172.16.20.8/90 to outside:125.145.215.185/80 netmask 255.255.255.255

WARNING: real-address conflict with existing static

  TCP dmz:172.16.20.8/90 to outside:125.145.215.185/80 netmask 255.255.255.255

Please note that, there was already a PAT when I execute the above command.

" static (dmz,outside) tcp 125.145.215.185 www 172.16.20.8 90 netmask 255.255.255.255 "

Output of show run static | in 125.145.215.185

static (dmz,outside) tcp 125.145.215.185 www 172.16.20.8 90 netmask 255.255.255.255

static (dmz,outside) 125.145.215.185 172.16.20.8 netmask 255.255.255.255

Output of sh run global

global (outside) 1 interface

global (outside) 3 125.145.215.182

global (outside) 2 125.145.215.183

global (outside) 4 125.145.215.184

Thanks & Regards

GK

New Member

Re: ASA port translation (PAT) Issue

Are you really sure you've activated port 90 just for the service ? I made a test on my rack configured as what you minded of the first half part . And it work so well.

New Member

Re: ASA port translation (PAT) Issue

Hi,

Thank you Mr. Lun,

The server is listening on port 90. and the user can access by typing (http:// address>:90).

The port translation is NOT working in ASA.

The strange thing is I have another port translation and it is working fine.

"ASA(config)# static (inside,outside) tcp 125.145.215.182 9130 192.168.10.2 80 netmask 255.255.255.255

ASA(config)# global (outside) interface (Note : interface IP)

The above config is working properly. The users accessing to web server on port 9130 and the translation is working.

Thanks & Regards

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

When you configure just the following:

static (DMZ,outside) tcp  125.145.215.185 www 172.16.20.8 90 netmask 255.255.255.255

and test to access it, can you please gather the syslog messages to see why it's not allowing the connection.

Also, "clear asp drop", and test the connection again, and grab the output of "show asp drop"

Cisco Employee

Re: ASA port translation (PAT) Issue

Gopal,

static (dmz,outside) tcp 125.145.215.185 www 172.16.20.8 90 netmask 255.255.255.255

static (dmz,outside) 125.145.215.185 172.16.20.8 netmask 255.255.255.255 --------------------------------> you already have this line

so, you cannot add the first line.  You have 1-1 NAT already configured.

You may want to remove static (dmz,outside) 125.145.215.185 172.16.20.8 netmask 255.255.255.255 line and then add

static PAT lines instead.

-KS

New Member

Re: ASA port translation (PAT) Issue

Hi Sankar,

Thank you for the message.

The issue is the port translation not working when I do the PAT as I mentioned earlier. But when I add 1-1 nat, then it work!.

Do I need to configure "inspect http" in global inspection?

Also I am preparing the syslog and will post it later.

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

So, you remove the 1-1 NAT and only leave the port 80 to port 90 static PAT, allowed permission via acl applied on the outside and you did a clear xlate x.x.x.x for this host and it does not work?

That is strange.  Need syslogs.

Are you sure this host 172.16.20.8 listens on port 90? Does it work internally when you try to load the page?

-KS

New Member

Re: ASA port translation (PAT) Issue

Thank you KS.

The server is listening on port 90. can be access from both inside and outside, by typing the port number with http address.

I will post the syslog later.

Thanks

GK

New Member

Re: ASA port translation (PAT) Issue

Dears,

Sorry for the late reply. The developer was on leave.

My goal is to translate port 80 from outside to port 90 dmz. Please find the syslog below.

Config:

ASA5540# access-list outside_access_in extended permit tcp any host 125.145.215.185  eq www
ASA5540# static (dmz,outside) tcp 125.145.215.185  www 172.16.20.8 90 netmask 255.255.255.255

Sys Log:

4/15/2010 10:44:11 Local4.Critical              192.9.1.100         Apr 15 2010 10:44:11: %ASA-2-106001: Inbound TCP connection denied from 213.101.111.189/2082 to 125.145.215.185/90 flags RST  on interface outside

4/15/2010            10:44:03               Local4.Critical     192.9.1.100         Apr 15 2010 10:44:03: %ASA-2-106001: Inbound TCP connection denied from 213.101.111.189/2151 to 125.145.215.185 /90 flags SYN  on interface outside

When I permit tcp 90 on outside interface and created a static NAT (config Below) and the user is trying access from outside http://125.145.215.185:90 it is working fine.

New Config
ASA5540# access-list outside_access_in extended permit tcp any host 125.145.215.185 eq 90
ASA5540# static (dmz,outside) 125.145.215.185  172.16.20.8 netmask 255.255.255.255

New sys log when permit TCP 90

Apr 15 2010 12:13:16: %ASA-6-302013: Built inbound TCP connection 6953415 for outside:213.100.118.100/13406 (213.100.118.100/13406) to dmz:172.16.20.8/90 (125.145.215.185/90)

Apr 15 2010 12:13:16: %ASA-6-302013: Built inbound TCP connection 6953414 for outside:213.100.118.100/13404 (213.100.118.100/13404) to dmz:172.16.20.8/90 (125.145.215.185/90)

Apr 15 2010 12:13:16: %ASA-6-302013: Built inbound TCP connection 6953413 for outside:213.100.118.100/13403 (213.100.118.100/13403) to dmz:172.16.20.8/90 (125.145.215.185/90)

Apr 15 2010 12:13:16: %ASA-6-302013: Built inbound TCP connection 6953412 for outside:213.100.118.100/13400 (213.100.118.100/13400) to dmz:172.16.20.8/90 (125.145.215.185/90)

Please advice, why the 1st config was not working.

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

You have tried the following 2 statements:

1) static (dmz,outside) tcp 125.145.215.185  www 172.16.20.8 90 netmask  255.255.255.255

2) static (web,outside) 125.145.215.185  172.16.20.8 netmask  255.255.255.255

You mentioned the second statement works, but not the first. But they are 2 different interfaces. First one is dmz, and the second one is web.

If you change your first line to the following:

static (web,outside) tcp 125.145.215.185  www 172.16.20.8 90 netmask  255.255.255.255

Does this work?

New Member

Re: ASA port translation (PAT) Issue

Hi Halijenn,

Thank you for the reply.

Both are same interface. when I customize the current config for posting, I forget to edit the interface name.

Please read as following.

1) static (dmz,outside) tcp 125.145.215.185  www 172.16.20.8 90 netmask  255.255.255.255

2) static (dmz,outside) 125.145.215.185  172.16.20.8 netmask  255.255.255.255

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

OK, in that case, can you check/test the following:

1) Do you have "inspect http" configured on your global policy? if you do, can you please remove it.

2) Can you please test with using a different port than port 80, maybe try with 8080 as follows:

static (dmz,outside) tcp 125.145.215.185 8080 172.16.20.8 90 netmask   255.255.255.255

access-list outside_access_in extended permit tcp any host  125.145.215.185  eq 8080

New Member

Re: ASA port translation (PAT) Issue

Thank you Halijenn,

We don't have 'inspect http' config in ASA

I have applied the same config as you requested.but no positive result.

config:

static (dmz,outside) tcp 125.145.215.185 8086 172.16.20.8 90 netmask   255.255.255.255

access-list outside_access_in extended permit tcp any host  125.145.215.185  eq 8086

Syslog:

04-17-2010 13:16:41 Local4.Critical 192.9.1.100 Apr 17 2010 13:16:41: %ASA-2-106001: Inbound TCP connection denied from 89.211.108.157/50002 to 125.145.215.185/90 flags SYN  on interface outside

04-17-2010 13:16:35 Local4.Critical 192.9.1.100 Apr 17 2010 13:16:35: %ASA-2-106001: Inbound TCP connection denied from 89.211.108.157/50002 to 125.145.215.185/90 flags SYN  on interface outside

04-17-2010 13:16:32 Local4.Critical 192.9.1.100 Apr 17 2010 13:16:32: %ASA-2-106001: Inbound TCP connection denied from 89.211.108.157/50002 to 125.145.215.185/90 flags SYN  on interface outside


04-17-2010 13:15:58 Local4.Critical 192.9.1.100 Apr 17 2010 13:15:58: %ASA-2-106001: Inbound TCP connection denied from 89.80.108.157/50001 to 125.145.215.185/90 flags SYN  on interface outside

04-17-2010 13:15:52 Local4.Critical 192.9.1.100 Apr 17 2010 13:15:52: %ASA-2-106001: Inbound TCP connection denied from 89.80.108.157/50001 to 125.145.215.185/90 flags SYN  on interface outside

04-17-2010 13:15:49 Local4.Critical 192.9.1.100 Apr 17 2010 13:15:49: %ASA-2-106001: Inbound TCP connection denied from 89.80.108.157/50001 to 125.145.215.185/90 flags SYN  on interface outside

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

Don't use port 90 to test. Use port 8080.

New Member

Re: ASA port translation (PAT) Issue

Yes Halijenn,

I Used port 8086 for test.

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

Port 8080 you mean? not 8086.

But your syslog is showing you are using port 90, hence it's being denied.

New Member

Re: ASA port translation (PAT) Issue

ok. I will use port 8080 intead of 8086. and will update you the syslog.

Thanks GK

New Member

Re: ASA port translation (PAT) Issue

Hi Halijenn,

No hope!

Syslog:

04-17-2010 13:48:39 Local4.Critical 192.9.1.100 Apr 17 2010 13:48:39: %ASA-2-106001: Inbound TCP connection denied from 89.211.108.157/50058 to 125.145.215.185/90 flags SYN  on interface outside

04-17-2010 13:48:33 Local4.Critical 192.9.1.100 Apr 17 2010 13:48:33: %ASA-2-106001: Inbound TCP connection denied from 89.211.108.157/50058 to 125.145.215.185/90 flags SYN  on interface outside

04-17-2010 13:48:30 Local4.Critical 192.9.1.100 Apr 17 2010 13:48:30: %ASA-2-106001: Inbound TCP connection denied from 89.211.108.157/50058 to 125.145.215.185/90 flags SYN  on interface outside

Config:

static (web,outside) tcp 125.145.215.185 8080 172.16.20.8 90 netmask 255.255.255.255

access-list outside_access_in extended permit tcp any host 125.145.215.185 eq 8080

So I execute from outside http://125.145.215.185:8080 , but no way !

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

Have you "clear xlate" and also remove the static 1:1 that you have earlier:

static (web,outside) 125.145.215.185 172.16.20.8 netmask  255.255.255.255

New Member

Re: ASA port translation (PAT) Issue

Yes Halijenn,

I did the clear xlate whenever I change NAT config also NAT 1:1 was not there.

We are using IPS sensor infront of ASA. That means any outside request will first hit on IPS. Inspection engine was switched off and tested the issue. But no hope.

Thanks

GK

Cisco Employee

Re: ASA port translation (PAT) Issue

The syslog does not match the configuration and your test.

You tested it on port 8080, but the syslog saw the connection towards port 90:

04-17-2010 13:48:39 Local4.Critical 192.9.1.100 Apr 17 2010 13:48:39:  %ASA-2-106001: Inbound TCP connection denied from 89.211.108.157/50058  to 125.145.215.185/90 flags SYN  on interface outside

New Member

Re: ASA port translation (PAT) Issue

Hi Halijenn,

The server is listening on port 90 from inside.So the packet should go to port 90 after the port translation.

That means from outside (x.x.x.x/8080) to dmz : 172.16.20.8/90 (125.145.215.185/90)

That's why the syslog is showing port 90.

Thanks

GK

4121
Views
0
Helpful
39
Replies