Cisco PIX Hardening Port Forward

Posted on 2010-09-14
Medium Priority
Last Modified: 2012-06-27
I am trying to set up this PIX 5.0 to only allow SMTP to come from a specific range of addresses. I have defined a group "ISPSMTP" covering this range and have also set up the port forwarding. Everything works great, but I can't figure out how to block all SMTP connection except those from the defined group.

I tried setting up a rule to only allow ISPSMTP to the the Exchange server. It appears to work, but when I apply the settings, it change the rule from the Exchange server to the IP of their old email server.

I checked all the definitions and there is nothing left that associates port 25 with the old server. So I don't know why the PIX tries to change it. I have tried defining the rule by name and also IP of the new server, but it always changes back.

This is all in the GUI as I am not a Cisco person. If anyone has heard of this issue or has an idea how to solve it, that would be great.
Question by:Brian B
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 33674731
Please attach your config
LVL 24

Author Comment

by:Brian B
ID: 33675646
As I said I am not a cisco person, however I think this is what you are looking for. I have starred out identifying information.
Again, I am trying to allow only the ranges Netaccess1 and Netaccess2 to send SMTP to my server Exchange. I tried to do this by allowing the two ranges and blocking everything else.

PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password ******** encrypted
passwd ******* encrypted
hostname firewall
domain-name domain.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
name Exchange
name Streamline
name Notes
name Netaccess1
name Netaccess2
object-group network NetaccessGroup
  network-object Netaccess2
  network-object Netaccess1
access-list vpngroup_splitTunnelAcl permit ip any any
access-list inside_outbound_nat0_acl permit ip any
access-list outside_cryptomap_dyn_20 permit ip any
access-list inbound permit tcp host Netaccess1 eq smtp host eq smtp
access-list inbound remark Allow netaccess email
access-list inbound permit tcp Netaccess2 eq smtp host eq smtp
access-list inbound remark Block all other SMTP
access-list inbound deny tcp any eq smtp any eq smtp
access-list inbound permit icmp any any
access-list inbound permit tcp any any
pager lines 24
icmp permit any outside
mtu outside 1500
mtu inside 1500
ip address outside pppoe setroute
ip address inside
ip audit info action alarm
ip audit attack action alarm
ip local pool vpnpool
pdm location Notes inside
pdm location Streamline inside
pdm location outside
pdm location outside
pdm location inside
pdm location Exchange inside
pdm location Netaccess2 outside
pdm location Netaccess1 outside
pdm group NetaccessGroup outside
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 interface 3389 Streamline 3389 netmask 0 0
static (inside,outside) tcp interface pcanywhere-data Streamline pcanywhere-data netmask 0 0
static (inside,outside) tcp interface 5632 Streamline 5632 netmask 0 0
static (inside,outside) tcp https Exchange https netmask 0 0
static (inside,outside) tcp smtp Exchange smtp netmask 0 0
static (inside,outside) tcp 3101 Exchange 3101 netmask 0 0
static (inside,outside) tcp pop3 Notes pop3 netmask 0 0
static (inside,outside) tcp www Notes www netmask 0 0
static (inside,outside) tcp lotusnotes Notes lotusnotes netmask 0 0
access-group inbound in interface outside
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 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 match address outside_cryptomap_dyn_20
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 authentication LOCAL
crypto map outside_map interface outside
isakmp enable outside
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 vpngroup address-pool vpnpool
vpngroup vpngroup dns-server
vpngroup vpngroup default-domain domain.com
vpngroup vpngroup split-tunnel vpngroup_splitTunnelAcl
vpngroup vpngroup idle-time 1800
vpngroup vpngroup password ********
telnet timeout 5
ssh inside
ssh timeout 5
console timeout 0
vpdn group pppoe_group request dialout pppoe
vpdn group pppoe_group localname **********
vpdn group pppoe_group ppp authentication pap
vpdn username ********** password ********* store-local
username terran password ********* encrypted privilege 15
username barbc password ********* encrypted privilege 3
username admin password ********** encrypted privilege 15
terminal width 80
: end

Expert Comment

ID: 33682068
whats the private ip of your new exchange server and your old exchange server?
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

LVL 24

Author Comment

by:Brian B
ID: 33682711
Exchange is
The old Notes server is

Its not changing any more. I was able to set up the rule, but it didn't work. That is the above config.

Accepted Solution

Markus Braun earned 1500 total points
ID: 33699862
change this

access-list inbound deny tcp any eq smtp any eq smtp
(this only blocks traffic from source port 25 and that will in most cases always be a different one)
access-list inbound deny tcp any any eq smtp
(so you block any source with destination port 25)

also these (avoid source ports in destination access-lists)

access-list inbound permit tcp host Netaccess1 eq smtp host eq smtp
to access-list inbound permit tcp host Netaccess1  host eq smtp
access-list inbound permit tcp Netaccess2 eq smtp host eq smtp
to access-list inbound permit tcp Netaccess2 host eq smtp

and after you are done u need to do a "write mem"
to save your config, otherwise the next boot it will be gone again

and since there is so little you have configured i would get rid of these too

name Exchange
name Streamline
name Notes
name Netaccess1
name Netaccess2
object-group network NetaccessGroup
  network-object Netaccess2
  network-object Netaccess1

and just use the IP addresses in your access-l, it is easier to read and the above makes it more complicated than it could be
LVL 24

Author Comment

by:Brian B
ID: 33729330
Will try that, thanks!
LVL 24

Author Closing Comment

by:Brian B
ID: 33748438
In the end, it was decided to replace the PIX. So question is kind of moot. However, thanks for the effort and time trying to help.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
When speed and performance are vital to revenue, companies must have complete confidence in their cloud environment.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question