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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP to outside not working.

Status
Not open for further replies.

boondoogle

Technical User
May 7, 2008
6
TN
Hi,
I have a small setup with a PIX 506E between the site and the Internet. I've been given only one useable public IP address which I've configured to allow my staff to be able to connect to our internal email server as well as do some VOIP. Everything works great except that we're unable to send email to the outside though we receive emails. Upon checking the firewall logs I noticed that the 506 is dropping the smtp connections to the outside. The logs show TCP RESET-O and teardowns.

May 07 08:34:43 192.168.1.1 May 06 2008 22:37:12: %PIX-6-302013: Built outbound TCP connection 232106 for outside:85.158.136.83/25 (85.158.136.83/25) to inside:10.1.1.1/27754 (217.30.17.158/28155)
May 07 08:34:44 192.168.1.1 May 06 2008 22:37:12: %PIX-6-302014: Teardown TCP connection 232106 for outside:85.158.136.83/25 to inside:10.1.1.1/27754 duration 0:00:00 bytes 0 TCP Reset-O

Here's my config:


PIX Version 6.3(5)
interface ethernet0 10full
interface ethernet1 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password eyhZBrbFEq1ZBSlU encrypted
passwd KJceArJXnC9SkKAH encrypted
hostname pixfirewall
domain-name ciscopix.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
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
name 192.168.1.254 VOICE_SERVER
name 10.1.1.1 MAIL_SERVER
object-group icmp-type icmp-grp
description ICMP Types allow into the FW
icmp-object echo-reply
icmp-object unreachable
icmp-object time-exceeded
object-group service media_tcp_ports tcp
port-object eq 32950
port-object eq www
port-object eq https
port-object range 5060 5063
port-object eq 554
port-object eq 1755
port-object eq smtp
object-group service media_udp_ports udp
port-object range 5060 5063
port-object range 10000 50000
object-group icmp-type ICMP-INBOUND
description Allowable inbound ICMP traffic
icmp-object echo-reply
icmp-object unreachable
icmp-object time-exceeded
object-group service PUBLIC-SERVER-TCP tcp
description Allowable inbound TCP traffic
port-object range ftp-data ftp
port-object eq smtp
port-object eq www
port-object range nntp nntp
port-object range pop3 pop3
port-object eq imap4
port-object range sqlnet 1526
port-object range 995 995
port-object eq ldaps
port-object eq pop3
port-object range imap4 imap4
port-object range 993 993
port-object eq https
port-object eq ldap
port-object eq sqlnet
port-object range 7777 7778
port-object eq 1810
port-object range 5222 5223
port-object range 1025 1026
port-object range 7340 7341
port-object range 7350 7351
port-object eq 7360
port-object eq 7370
port-object eq 5269
port-object eq 1027
port-object eq 3478
port-object eq 8250
port-object eq 6004
port-object eq 6102
port-object eq 6201
port-object eq 5730
port-object eq 9000
port-object eq 9300
port-object eq 9301
port-object eq 9302
access-list from-inside permit icmp 192.168.1.0 255.255.255.0 any
access-list from-inside permit ip 192.168.1.0 255.255.255.0 any
access-list from-inside permit tcp any any eq nntp
access-list from-inside permit tcp any any eq https
access-list from-inside permit tcp any host 55.30.17.158
access-list from-inside permit tcp host MAIL_SERVER any eq smtp log
access-list from-inside permit tcp any host 55.30.17.157
access-list INBOUND permit icmp any host 55.30.17.158 object-group ICMP-INBOUND
access-list INBOUND permit tcp any host 55.30.17.158 object-group PUBLIC-SERVER-TCP log
access-list INBOUND permit udp any host 55.30.17.158 object-group media_udp_ports
access-list INBOUND permit icmp any any
access-list INBOUND permit tcp any host MAIL_SERVER object-group PUBLIC-SERVER-TCP log
access-list INBOUND permit tcp any host MAIL_SERVER eq smtp log
access-list INBOUND permit tcp host MAIL_SERVER any eq smtp log
pager lines 25
logging on
logging timestamp
logging standby
logging monitor debugging
logging trap debugging
logging host inside 10.1.2.193
mtu outside 1500
mtu inside 1500
ip address outside 55.30.17.158 255.255.255.252
ip address inside 192.168.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm logging informational 100
pdm history enable
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 MAIL_SERVER smtp netmask 255.255.255.255 0 0
static (inside,outside) tcp interface https MAIL_SERVER https netmask 255.255.255.255 0 0
static (inside,outside) tcp interface pop3 MAIL_SERVER pop3 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface imap4 MAIL_SERVER imap4 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7777 MAIL_SERVER 7777 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7778 MAIL_SERVER 7778 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface ldap MAIL_SERVER ldap netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 993 MAIL_SERVER 993 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 995 MAIL_SERVER 995 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5222 MAIL_SERVER 5222 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5223 MAIL_SERVER 5223 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 1026 MAIL_SERVER 1026 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 1025 MAIL_SERVER 1025 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 1027 MAIL_SERVER 1027 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7340 MAIL_SERVER 7340 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7341 MAIL_SERVER 7341 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7350 MAIL_SERVER 7350 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7351 MAIL_SERVER 7351 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7370 MAIL_SERVER 7370 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5269 MAIL_SERVER 5269 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7360 MAIL_SERVER 7360 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 3478 MAIL_SERVER 3478 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 4443 MAIL_SERVER 4443 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 4444 MAIL_SERVER 4444 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 8250 MAIL_SERVER 8250 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 6004 MAIL_SERVER 6004 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 6102 MAIL_SERVER 6102 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 6201 MAIL_SERVER 6201 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5730 MAIL_SERVER 5730 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9000 MAIL_SERVER 9000 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9300 MAIL_SERVER 9300 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9301 MAIL_SERVER 9301 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9302 MAIL_SERVER 9302 netmask 255.255.255.255 0 0
access-group INBOUND in interface outside
access-group from-inside in interface inside
route outside 0.0.0.0 0.0.0.0 55.30.17.157 1
route inside 10.1.2.0 255.255.255.0 10.1.2.1 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 sip-disconnect 0:02:00 sip-invite 0:03: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
http server enable
http 192.168.1.0 255.255.255.0 inside
http 10.1.2.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set example_set esp-des esp-md5-hmac
crypto dynamic-map dyn_example_map 10 set transform-set example_set
crypto map example_map 10 ipsec-isakmp dynamic dyn_example_map
crypto map example_map interface outside
isakmp enable outside
isakmp identity address
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption des
isakmp policy 10 hash md5
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400

Is this a problem of packets flowing from a lower to a higher security interface? I doubt that as other packets are going through. Can the gurus take a look and tell me what I'm doing wrong?

Best.
 
Disable SMTP fixup. Exchange uses ESMTP and the 506e doesn't support it.
No fixup protocol SMTP 25

Brent
Systems Engineer / Consultant
CCNP, CCSP
 
Supergrrover I tried that but no joy. It appears to me that the 506E drops the connection immediately at the outside interface. Thus the packets do not even reach the destined server.

 
Ahh,
Took a closer look. You have your ACL messed up.
access-list INBOUND permit tcp any host MAIL_SERVER eq smtp log

Needs to be

access-list INBOUND permit tcp any host 55.30.17.158 eq smtp log
You will need to change this for each entry in the ACL for any inbound traffic. The ACL allows traffic through that interface so that is the IP that needs to be referenced.

You can also remove this
access-group from-inside in interface inside

It isn't actually doing anything. All traffic is allowed outbound by default.

A side note, the Email IP is
name 10.1.1.1 MAIL_SERVER
but there is no route to this only
route inside 10.1.2.0 255.255.255.0 10.1.2.1 1

Hope this helps.


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
Thanks supergrrover however this does not work either. The rule access-list INBOUND permit tcp any host 55.30.17.158 object-group PUBLIC-SERVER-TCP log encompasses that which you've suggested. I've removed the other rules but the firewall is still blocking smtp out. Real crazy thing happening here.

I still don't understand why the port translation rule works for smtp from outside to inside but not vice-versa.

 
BAsh12, thanks for the suggestion but this did not add any joy. strange thing though. When I try a telnet to port 25 of the smtp server of my ISP and then do a show outbound I get nothing, though a show xlate shows a PAT. Is this significant?
 
Post your new config again.
Is your ISP blocking SMTP traffic? Some block all outbound SMTP except their own.


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
Hi Super,

Here's the new config. And yes I've sent an email to my ISP to check if they're not blocking SMTP. Curious though, if they're blocking SMTP should I be receiving email at all? This is because my email server is able to receive emails and the logs show the conversations with our mail provider's server.

PIX Version 6.3(5)
interface ethernet0 10full
interface ethernet1 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password pinkaso encrypted
passwd tuounzafi encrypted
hostname pixfirewall
domain-name ciscopix.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
name 192.168.1.130 VOICE_SERVER
name 10.1.2.185 MAIL_SERVER
name 10.1.2.182 null-server
object-group icmp-type icmp-grp
description ICMP Types allow into the FW
icmp-object echo-reply
icmp-object unreachable
icmp-object time-exceeded
object-group service media_tcp_ports tcp
port-object eq 32950
port-object eq www
port-object eq https
port-object range 5060 5063
port-object eq 554
port-object eq 1755
port-object eq smtp
object-group service media_udp_ports udp
port-object range 5060 5063
port-object range 10000 50000
object-group icmp-type ICMP-INBOUND
description Allowable inbound ICMP traffic
icmp-object echo-reply
icmp-object unreachable
icmp-object time-exceeded
object-group service PUBLIC-SERVER-TCP tcp
description Allowable inbound TCP traffic
port-object range ftp-data ftp
port-object eq smtp
port-object eq www
port-object range nntp nntp
port-object range pop3 pop3
port-object eq imap4
port-object range sqlnet 1526
port-object range 995 995
port-object eq ldaps
port-object eq pop3
port-object range imap4 imap4
port-object range 993 993
port-object eq https
port-object eq ldap
port-object eq sqlnet
port-object range 7777 7778
port-object eq 1810
port-object range 5222 5223
port-object range 1025 1026
port-object range 7340 7341
port-object range 7350 7351
port-object eq 7360
port-object eq 7370
port-object eq 5269
port-object eq 1027
port-object eq 3478
port-object eq 8250
port-object eq 6004
port-object eq 6102
port-object eq 6201
port-object eq 5730
port-object eq 9000
port-object eq 9300
port-object eq 9301
port-object eq 9302
access-list from-outside permit icmp any any object-group icmp-grp
access-list from-outside deny icmp 192.168.1.0 255.255.255.0 any
access-list from-inside permit icmp 192.168.1.0 255.255.255.0 any
access-list from-inside permit ip 192.168.1.0 255.255.255.0 any
access-list from-inside permit tcp any any eq nntp
access-list from-inside permit tcp any any eq https
access-list from-inside permit tcp any host 217.30.17.158
access-list from-inside permit tcp host MAIL_SERVER any eq smtp log
access-list from-inside permit ip any any
access-list from-inside permit tcp any host 217.30.17.157
access-list from-inside deny tcp any any eq 4662
access-list from-inside deny tcp any any eq 6346
access-list from-inside deny tcp any any eq 6347
access-list from-inside deny tcp any any eq 9999
access-list from-inside deny tcp any any eq 1214
access-list from-inside remark Deny access to Internet for this server.
access-list from-inside deny tcp host null-server any log
access-list from-inside deny udp host null-server any log
access-list from-inside permit tcp any eq smtp any log
access-list from-inside permit tcp 10.1.2.0 255.255.255.0 eq smtp any log
access-list INBOUND permit icmp any host 55.30.17.158 object-group ICMP-INBOUND
access-list INBOUND permit tcp any host 55.30.17.158 object-group PUBLIC-SERVER-TCP log
access-list INBOUND permit udp any host 55.30.17.158 object-group media_udp_ports
access-list INBOUND permit icmp any any
access-list INBOUND permit tcp any host 55.30.17.158 eq smtp log
pager lines 25
logging on
logging timestamp
logging standby
logging monitor debugging
logging trap debugging
logging host inside 10.1.2.193
mtu outside 1500
mtu inside 1500
ip address outside 55.30.17.158 255.255.255.252
ip address inside 192.168.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool client_VPN 192.168.2.1-192.168.2.254
pdm location 192.168.1.7 255.255.255.255 inside
pdm location VOICE_SERVER 255.255.255.255 inside
pdm location 10.1.2.0 255.255.255.0 inside
pdm location 10.1.2.193 255.255.255.255 inside
pdm location 10.1.3.0 255.255.255.0 inside
pdm location 0.0.0.0 255.255.255.255 outside
pdm location 213.150.169.244 255.255.255.252 outside
pdm location 213.150.169.0 255.255.255.0 outside
pdm location 213.150.176.224 255.255.255.248 outside
pdm location 213.150.0.0 255.255.0.0 outside
pdm location MAIL_SERVER 255.255.255.255 inside
pdm location MAIL_SERVER 255.255.255.255 outside
pdm location 55.30.17.157 255.255.255.255 outside
pdm location null-server 255.255.255.255 inside
pdm logging informational 100
pdm history enable
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 MAIL_SERVER smtp netmask 255.255.255.255 0 0
static (inside,outside) tcp interface https MAIL_SERVER https netmask 255.255.255.255 0 0
static (inside,outside) tcp interface pop3 MAIL_SERVER pop3 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface imap4 MAIL_SERVER imap4 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7777 MAIL_SERVER 7777 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7778 MAIL_SERVER 7778 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface ldap MAIL_SERVER ldap netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 993 MAIL_SERVER 993 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 995 MAIL_SERVER 995 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5222 MAIL_SERVER 5222 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5223 MAIL_SERVER 5223 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 1026 MAIL_SERVER 1026 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 1025 MAIL_SERVER 1025 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 1027 MAIL_SERVER 1027 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7340 MAIL_SERVER 7340 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7341 MAIL_SERVER 7341 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7350 MAIL_SERVER 7350 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7351 MAIL_SERVER 7351 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7370 MAIL_SERVER 7370 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5269 MAIL_SERVER 5269 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 7360 MAIL_SERVER 7360 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 3478 MAIL_SERVER 3478 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 4443 MAIL_SERVER 4443 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 4444 MAIL_SERVER 4444 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 8250 MAIL_SERVER 8250 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 6004 MAIL_SERVER 6004 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 6102 MAIL_SERVER 6102 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 6201 MAIL_SERVER 6201 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5730 MAIL_SERVER 5730 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9000 MAIL_SERVER 9000 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9300 MAIL_SERVER 9300 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9301 MAIL_SERVER 9301 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 9302 MAIL_SERVER 9302 netmask 255.255.255.255 0 0
static (outside,inside) tcp interface smtp 55.30.17.158 smtp netmask 255.255.255.255 0 0
access-group INBOUND in interface outside
route outside 0.0.0.0 0.0.0.0 55.30.17.157 1
route inside 10.1.2.0 255.255.255.0 10.1.2.1 1
route inside 192.168.1.0 255.255.255.0 192.168.1.1 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 sip-disconnect 0:02:00 sip-invite 0:03: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
http server enable
http 0.0.0.0 0.0.0.0 outside
http 192.168.1.0 255.255.255.0 inside
http 10.1.2.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set example_set esp-des esp-md5-hmac
crypto dynamic-map dyn_example_map 10 set transform-set example_set
crypto map example_map 10 ipsec-isakmp dynamic dyn_example_map
crypto map example_map interface outside
isakmp enable outside
isakmp identity address
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption des
isakmp policy 10 hash md5
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400
vpngroup example_group address-pool client_VPN
vpngroup example_group dns-server 192.168.1.40
vpngroup example_group default-domain oaglforlab.tn
vpngroup example_group idle-time 1800
vpngroup example_group password ********
telnet 0.0.0.0 0.0.0.0 outside
telnet 213.150.176.224 255.255.255.248 outside
telnet 213.150.169.244 255.255.255.252 outside
telnet 213.150.0.0 255.255.0.0 outside
telnet 0.0.0.0 0.0.0.0 inside
telnet timeout 5
ssh 213.150.169.0 255.255.255.0 outside
ssh 0.0.0.0 0.0.0.0 outside
ssh 0.0.0.0 255.255.255.255 outside
ssh 213.150.176.224 255.255.255.248 outside
ssh 213.150.169.244 255.255.255.252 outside
ssh 0.0.0.0 0.0.0.0 inside
ssh timeout 5
console timeout 0
vpdn enable outside
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
username oyuuni password wanGraRaMama encrypted privilege 15
terminal width 80
Cryptochecksum:c43a1aa5fea4f1ff87a0bd2993a1b1bc
 
Thanks super and bash. The problem has been traced to the ISP as super suggested. This has been fixed and everything is working fine. Thanks once again for your suggestions.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top