Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP port-forwading on PIX 501

Status
Not open for further replies.

BlitzCan

IS-IT--Management
Feb 3, 2006
12
0
0
CA
Hi Everyone,

I asked this question before, but got no replies, so here goes again...

I need to configure a PIX 501 to allow inbound SMTP connections to an Exchange server. Simple enough, yes, and in fact I've done this before on a PIX 515E without problems. This pix is also setup to nat the internal subnet (172.18.142.x) to the single external IP, and to allow inbound VPN/PPTP connections.

Here are the pertinent excepts from the running config:

> global (outside) 1 interface
> access-list outside_in permit tcp any interface outside eq smtp
> static (inside,outside) tcp interface smtp 172.18.142.254 smtp netmask 255.255.255.255 0 0
> access-group outside_in in interface outside

I've also tried replacing the above access-list with the following, also with no luck:

> access-list outside_in permit tcp any eq smtp interface outside eq smtp

At first when I attempted telneting into the router's external IP on port 25 (from another location), it would connect, but no text appeared, inputs didn't echo, and eventually the connection would drop after 30 seconds or a minute. Now, presumably as a result of my tinkering around with the config, I can't even get telnet to connect on port 25.

Thanks in advance!
 
Go back to using access-list outside_in permit tcp any interface outside eq smtp.

The access list entry you tried is invalid and will never work for you.

Also try entering the following in config mode and retrying a port 25 connection:

no fixup smtp
 
Although I didn't include it in the config info I posted, I do always turn fixup smtp off, as I know it causes problems with Exchange (and other ESMTP mail servers).

On a side note, I've setup the NAT for the entire subnet (172.18.142.0/24), which includes the server's IP. Is it possible that this is causing the problem with port-forwarding smtp connections?

Thanks in advance!
 
Okay, I'm posting the entire PIX config this time around (cleansed for public viewing, of course).

Under this config, I am able to telnet into port 25 of the external IP from another location, but get no responses, and no key echoing. Eventually the connection drops after 30s-1m.

Is it possible that the dynamic nat (pat) for internal users, which is set to 0.0.0.0 subnet 0.0.0.0, is interfering with my static nat for the incoming smtp? I always thought this was a non-issue, since PIX is stateful and all. But anyway, if so, should I use an access-list to define the internal addresses I want natted to the outside single IP?

For reference, the exchange server is at 172.18.142.254.

Thanks in advance!

PIX Version 6.3(4)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
hostname pix501
domain-name blahblah.com
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
no fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list outside_in permit icmp any any
access-list outside_in permit tcp any interface outside eq smtp
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside xx.99.207.30 255.255.255.252
ip address inside 172.18.142.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool VPNpool 172.18.142.200-172.18.142.219
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) tcp interface smtp 172.18.142.254 smtp netmask 255.255.255.255 0 0
access-group outside_in in interface outside
route outside 0.0.0.0 0.0.0.0 xx.99.207.29 1
timeout xlate 0:05:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
aaa authentication ssh console LOCAL
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
telnet timeout 5
console timeout 0
vpdn group VPN accept dialin pptp
vpdn group VPN ppp authentication pap
vpdn group VPN ppp authentication chap
vpdn group VPN ppp authentication mschap
vpdn group VPN ppp encryption mppe auto required
vpdn group VPN client configuration address local VPNpool
vpdn group VPN client configuration dns 172.18.142.254
vpdn group VPN pptp echo 60
vpdn group VPN client authentication local
vpdn enable outside
terminal width 80
Cryptochecksum:2d24181eb58007ea0617be5574147b15
: end
 
What you're doing makes sense to be honest and I can't readily explain why it's all breaking down.

The fact that you can actually establish a connection to the smtp server pretty much confirms your NAT and access list is probably not the cause of the issue.

Presumably if you telnet to the same server from inside the network, you don't see the same symptoms?

Do you have a spare outside public IP? May be worth setting that up as a static and mapping your smtp server to that address. Otherwise your suggestion of denying the email server from an access list that determins which inside hosts belong to global (outside) 1 interface might be a way forward.

As I say though I'm not sure it's a NAT/ACL issue but when I'm not abundantly sure which way to go, I'd try anything.
 
Thanks for the affirmation that I'm actually doing this correctly. I've been banging my head on the wall for several days now over this.

And yes, you're right, when I telnet to the exchange server from inside the lan, I get the proper ESMTP greeting.

Unfortunately we're configured with a /30 ip block, which means we only get two addresses, with one eaten up by the ISP's router.

I'll keep tinkering with the config and see where I go. In the meantime, if anyone has a suggestion, please let me know!

Thanks in advance!
 
Also, I just realized that I now can't connect to or ping any internal addresses when connected by VPN, which I used to be able to do. Any ideas? Do I need a default gateway for those connections?
 
Well, now I know I'm not going crazy. I did a bit of testing today, and was able to get http port forwarding working (using the same code as for smtp, just modified for http). Further, I was even able to redirect the external port 91 (picked at random) to the server's port 25, and was then able to telnet into it from another site and received the expected Exchange ESMTP greeting. However, upon changing the settings back to port 25/25, it goes right back to connecting but no text appearing, and no echoing.

Is it possible this PIX is pooched? If so, what would one suggest doing about it.'

Thanks!

Geoff.
 
Hi Geoff,

Did you manage to get a resolve for this... I am in the same situation as you and its driving me insane.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top