Link to home
Start Free TrialLog in
Avatar of rbrindisi
rbrindisiFlag for United States of America

asked on

Can't telnet to port 25 through PIX

I just opened SMTP port 25 on my PIX 520 to receive external email to my exchange server. I think I have the configuration correct. Howerver I cannot telnet to port 25 from an external network. Does the PIX need to be re-started to accept the changes?
Avatar of Stacy Spear
Stacy Spear
Flag of United States of America image

Did you commit?
Avatar of rbrindisi

ASKER

I did do a write mem
Please check the following:

1.  If you get output such as the following:

220 *********************************2**0***2*******0**0**2**2***

then this is the "mailguard" feature that the PIX implements with the "fixup protocol smtp 25" command.  It's meant to obfuscate the SMTP banner that appears when you telnet to port TCP 25 that can identify the type of e-mail server you are running and is commonly used to fingerprint an e-mail system in preparation for a possible attack.

2.  You don't have the proper access list applied to the outside interface and/or static translation that allows inbound TCP 25 to your mail server.  Check to see if you have statements similar to the following:

access-list acl_out_in permit tcp any host 1.1.1.1 eq 25   <----1.1.1.1 is the public IP address of your e-mail server

static (inside,outside) 1.1.1.1 192.168.1.1 netmask 255.255.255.255
access-group acl_out_in in interface outside

3.  Verify that the above commands are configured correctly for your environment, i.e. make sure that the IP addresses in the static translation are correct, etc.

If none of these issues seem to be your case, please post the PIX config and we can take a look.
I think I got it right. See my shortened configuration below. Let me know what you think.

Thanks


fixup protocol dns maximum-length 512
fixup protocol ftp 21
no fixup protocol h323 h225 1720
no fixup protocol h323 ras 1718-1719
no fixup protocol http 80
no fixup protocol rsh 514
no fixup protocol rtsp 554
no fixup protocol sip 5060
fixup protocol sip udp 5060
no fixup protocol skinny 2000
no fixup protocol smtp 25
no fixup protocol sqlnet 1521
fixup protocol tftp 69
access-list 102 permit ip host xx.xx.154.1 host 192.168.0.9
access-list 102 permit tcp any host xx.xx.154.1 eq 3389
access-list 102 permit tcp any host xx.xx.154.1 eq smtp
access-list 102 permit icmp any any
access-list 103 permit ip 192.168.0.0 255.255.255.0 192.168.1.0 255.255.255.0
pager lines 24
logging on
logging timestamp
logging buffered debugging
logging trap informational
logging host inside 192.168.0.20
ip address outside xx.xx.154.2 255.255.255.248
ip address inside 192.168.0.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
no failover
failover timeout 0:00:00
failover poll 15
no failover ip address outside
no failover ip address inside
pdm history enable
arp timeout 14400
global (outside) 1 xx.xx.154.4
nat (inside) 0 access-list 103
nat (inside) 2 access-list 101 0 0
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) tcp xx.xx.154.1 smtp 192.168.0.9 smtp netmask 255.255.255.255 0 0
static (inside,outside) xx.xx.154.5 192.168.0.1 netmask 255.255.255.255 0 0
static (inside,outside) xx.xx.154.3 192.168.0.11 netmask 255.255.255.255 0 0
access-group 102 in interface outside
It looks OK to me...so what do you get if you try to do this:

telnet xx.xx.154.1 25

from an external host?  Do you get nothing or do you get an error message of some sort?

From the inside, can you do this:

telnet 192.168.0.9 25

and get it to work?
Telnet from the inside connects fine. I connect fast and see the banner. From the outside it looks like it's in a telnet session (no unable to connect errors), I don't see the banner, and when I type only dashes are echoed to the screen. I tested this from a Verizon wireless laptop and my optonline.net account at home. If this means anything we have business class cable through Time Warner.

Thanks
What version of PIX OS are you running?
PIX Version 6.3(4)
You can try setting up a capture to verify the traffic is coming in correctly.  To do this, put in these commands:

access-list acl_smtpcap permit tcp any host xx.xx.154.1 eq smtp
capture smtpcap access-list acl_smtpcap interface outside

Then try to do the telnet from an external host.  Once you've done this, go back to the PIX and issue this command:

show capture smtpcap

Look at the output and see what you get...
Sounds like a solid plan. I will give it a shot and hopefully get back to you by the end of the day.

Than you
Looks like it can see smtp traffic....

TTCPIX# show capture smtpcap
0 packet captured
0 packet shown
TTCPIX#
Do you mean "cannot" see the traffic, because it shows 0 packets captured after you're telnet.  Can you post your running config and also the output of the "show capture" command?
Here it is....

PIX Version 6.3(4)
interface ethernet0 auto
interface ethernet1 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd JEP3QpG8x0VOcc7x encrypted
hostname TTCPIX
fixup protocol dns maximum-length 512
fixup protocol ftp 21
no fixup protocol h323 h225 1720
no fixup protocol h323 ras 1718-1719
no fixup protocol http 80
no fixup protocol rsh 514
no fixup protocol rtsp 554
no fixup protocol sip 5060
fixup protocol sip udp 5060
no fixup protocol skinny 2000
no fixup protocol smtp 25
no fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list 100 permit tcp any host XX.XX.154.4 eq pop3
access-list 100 permit tcp any host XX.XX.154.4 eq smtp
access-list 100 permit icmp any any unreachable
access-list 100 permit icmp any any echo-reply
access-list 100 permit icmp any any time-exceeded
access-list 101 permit ip host XX.XX.154.3 10.10.0.0 255.255.0.0
access-list 101 permit ip host XX.XX.154.3 host XX.XX.9.99
access-list 101 permit ip host XX.XX.154.3 host XX.XX.2.109
access-list 102 permit ip host XX.XX.154.3 host 192.168.0.11
access-list 102 permit ip host XX.XX.154.1 host 192.168.0.9
access-list 102 permit tcp any host XX.XX.154.1 eq 3389
access-list 102 permit tcp any host XX.XX.154.1 eq smtp
access-list 102 permit icmp any any
access-list 103 permit ip 192.168.0.0 255.255.255.0 192.168.1.0 255.255.255.0
access-list acl_smtpcap permit tcp any host XX.XX.154.1 eq smtp
pager lines 24
logging on
logging timestamp
logging buffered debugging
logging trap informational
logging host inside 192.168.0.20
mtu outside 1500
mtu inside 1500
ip address outside XX.XX.154.2 255.255.255.248
ip address inside 192.168.0.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool mypool 192.168.1.1-192.168.1.10
no failover
failover timeout 0:00:00
failover poll 15
no failover ip address outside
no failover ip address inside
pdm history enable
arp timeout 14400
global (outside) 1 XX.XX.154.4
nat (inside) 0 access-list 103
nat (inside) 2 access-list 101 0 0
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) tcp XX.XX.154.1 smtp 192.168.0.9 smtp netmask 255.255.255.255 0 0
static (inside,outside) XX.XX.154.5 192.168.0.1 netmask 255.255.255.255 0 0
static (inside,outside) XX.XX.154.3 192.168.0.11 netmask 255.255.255.255 0 0
access-group 102 in interface outside
route outside 0.0.0.0 0.0.0.0 XX.XX.154.1 1
timeout xlate 3:00: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
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
no floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set chevelle esp-3des esp-sha-hmac
crypto ipsec transform-set strong-des esp-3des esp-sha-hmac
crypto dynamic-map mymap 2 set transform-set strong-des
crypto map transam 1 ipsec-isakmp
crypto map transam 1 match address 101
crypto map transam 1 set peer XX.XX.142.5
crypto map transam 1 set transform-set chevelle
crypto map partner-map 20 ipsec-isakmp dynamic mymap
crypto map partner-map interface outside
isakmp enable outside
isakmp key ******** address XX.XX.142.5 netmask 255.255.255.255
isakmp identity address
isakmp policy 2 authentication pre-share
isakmp policy 2 encryption 3des
isakmp policy 2 hash sha
isakmp policy 2 group 2
isakmp policy 2 lifetime 3600
isakmp policy 3 authentication pre-share
isakmp policy 3 encryption 3des
isakmp policy 3 hash sha
isakmp policy 3 group 2
isakmp policy 3 lifetime 86400
vpngroup myvpn address-pool mypool
vpngroup myvpn dns-server 192.168.0.9
vpngroup myvpn wins-server 192.168.0.9
vpngroup myvpn split-tunnel 103
vpngroup myvpn idle-time 1800
vpngroup myvpn password ********
telnet timeout 30
ssh timeout 5
console timeout 0
terminal width 80
banner exec Unauthorized access will be PROSECUTED!
Cryptochecksum:19cf6dde2a0b0ae99a8ee61109ccab99
: end
show capture smtpcap
0 packet captured
0 packet shown
TTCPIX#
You're default route outside is set to xx.xx.154.1 which is the same as the translation for your e-mail server.  Is this correct?  It doesn't sound like it...see your current config statements below:

static (inside,outside) tcp XX.XX.154.1 smtp 192.168.0.9 smtp netmask 255.255.255.255
route outside 0.0.0.0 0.0.0.0 XX.XX.154.1 1
I thought this was strange too. I was in contact with Microsoft’s tech support for Exchange server and he told me to use the routers IP (XX.XX.154.1). I asked him if I should use the outside PIX IP (XX.XX.154.2), he said to use the routers. Should this be changed to the outside PIX IP or should I use another IP supplied by my ISP?
ASKER CERTIFIED SOLUTION
Avatar of batry_boy
batry_boy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I changed the IP and WOW... it works!!! Thank for all your help.

TTCPIX# show capture smtpcap
3 packets captured
14:39:07.801609 66.174.79.233.31403 > 72.43.154.6.25: S 3793718968:3793718968(0)
 win 5840 <mss 1460,sackOK,timestamp 1660498088[|tcp]>
14:39:07.816516 66.174.79.233.31403 > 72.43.154.6.25: . ack 4274333236 win 5840
<nop,nop,timestamp 1660498089 0>
14:39:07.830340 66.174.79.233.31403 > 72.43.154.6.25: . ack 4274333362 win 5840
<nop,nop,timestamp 1660498091 2942213>
3 packets shown
You're welcome...glad it got resolved!