Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2626
  • Last Modified:

Need to Open SMTP port and redirect it to Exchange server Cisco PIX 501

I need to open port 25 on my pix 501 and forward it to my internal exchange server with ip  I tried doing that by looking at some posts but am not sure if I did it right because when I do telnet 25, I get an error “ could not open connection to the host on port 24.  Please note that I have replaced my public ip with for security reasons :-).  Please let me know if the port 25 is open and is being forward to my exchange server and if telent is the way to test it. Thank you for you help.

Building configuration...
: Saved
PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password cdS8OVu02pgL9w/8 encrypted
passwd cdS8OVu02pgL9w/8 encrypted
hostname pixfirewall
domain-name royalfitness.local
clock timezone EAST -6
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
access-list inside_outbound_nat0_acl permit ip any
access-list inside_outbound_nat0_acl permit ip
access-list outside_cryptomap_dyn_20 permit ip any
access-list splitacl permit ip
access-list inbound_acl permit tcp any host eq 3389
access-list outside_in permit tcp any host eq smtp
access-list outside-in permit tcp any host eq smtp
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside
ip address inside
ip audit info action alarm
ip audit attack action alarm
ip local pool VPNPool
pdm location inside
pdm location inside
pdm location inside
pdm location outside
pdm location outside
pdm location inside
pdm location outside
pdm location inside
pdm location inside
pdm location inside
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0 0
static (inside,outside) tcp 3389 3389 netmask 0 0
static (inside,outside) tcp smtp smtp netmask 0 0
access-group outside_in in interface outside
route outside 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 outside
http inside
http 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 ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
crypto map outside_map client configuration address respond
crypto map outside_map client authentication LOCAL
crypto map outside_map interface outside
isakmp enable outside
isakmp identity address
isakmp keepalive 10
isakmp nat-traversal 20
isakmp policy 1 authentication pre-share
isakmp policy 1 encryption 3des
isakmp policy 1 hash sha
isakmp policy 1 group 2
isakmp policy 1 lifetime 86400
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
vpngroup saavpn address-pool VPNPool
vpngroup saavpn dns-server
vpngroup saavpn wins-server
vpngroup saavpn split-tunnel splitacl
vpngroup saavpn idle-time 1800
vpngroup saavpn password ********
vpngroup royal idle-time 1800
vpngroup royal password ********
telnet outside
telnet outside
telnet inside
telnet inside
telnet timeout 5
ssh outside
ssh timeout 5
console timeout 0
dhcpd address inside
dhcpd dns
dhcpd wins
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
dhcpd enable inside
username vpnadmin password 30mrCM7hnW6aPDmz encrypted privilege 15
terminal width 80
: end

  • 3
  • 2
2 Solutions
Given what you have:

>no fixup protocol smtp 25
> access-list outside_in permit tcp any host eq smtp
>access-group outside_in in interface outside
>static (inside,outside) tcp smtp smtp netmask 0 0

There is no reason why it won't work...

Check the default gateway of the server....

You could use "interface" as below:

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

 Agree w/ lrmoore that the config looks good, but after you added the "static (inside,outside)" entry, did you also run the following?
 clear xlate
 clear local

>when I do telnet 25, I get an error...
  If you tried this from the inside, this is expected: PIX won't allow you to directly access your public IP from behind the PIX.  If you tried this from an external location outside the PIX, then something is amiss.

  Just to avoid confusion, I'd remove the almost-identically named ACL...
no access-list outside-in permit tcp any host eq smtp

netcompAuthor Commented:
Thanks for all of your help. I wanted to ask one last thing. If I  just wanted to rediract another port to the same server(port  443) using the same access list, is that possible. If so can you give me the commands. Is there a limit to the opening ports on one access list. Thank again for all of your help.
Firewall Management 201 with Professor Wool

In this whiteboard video, Professor Wool highlights the challenges, benefits and trade-offs of utilizing zero-touch automation for security policy change management. Watch and Learn!

Sure, just keep adding access-list commands with the port #

> access-list outside_in permit tcp any host eq www
> access-list outside_in permit tcp any host eq https
> access-list outside_in permit tcp any host eq pop3
As long as you also have the statics to match
static (inside,outside) tcp www www netmask
static (inside,outside) tcp https https netmask
static (inside,outside) tcp pop3 pop3 netmask

Only real limit is how many lines of config you can hold..couple of hundred maybe.. then you want to look at alternatives..
netcompAuthor Commented:
I noticed that you have “www” or “hhtps”  instead of port number. I assume that the pix knows for instance that www is port 80. If so , I was just wandring why did we have to do “no fixup protocol smtp 25” for the smtp port. Thanks , this would be my last questions  :-) . Thank you again,
no reason , just alternatives
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now