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
Solved

Cisco PIX Hardening Port Forward

Posted on 2010-09-14
7
637 Views
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.
0
Comment
Question by:Brian B
7 Comments
 
LVL 3

Expert Comment

by:Mystique_87
ID: 33674731
Please attach your config
0
 
LVL 23

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
names
name 10.3.1.20 Exchange
name 10.3.1.4 Streamline
name 10.3.1.2 Notes
name 216.145.96.15 Netaccess1
name 64.18.0.0 Netaccess2
object-group network NetaccessGroup
  network-object Netaccess2 255.255.240.0
  network-object Netaccess1 255.255.255.255
access-list vpngroup_splitTunnelAcl permit ip any any
access-list inside_outbound_nat0_acl permit ip any 172.16.1.0 255.255.255.240
access-list outside_cryptomap_dyn_20 permit ip any 172.16.1.0 255.255.255.240
access-list inbound permit tcp host Netaccess1 eq smtp host 216.145.98.72 eq smtp
access-list inbound remark Allow netaccess email
access-list inbound permit tcp Netaccess2 255.255.240.0 eq smtp host 216.145.98.72 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 10.3.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool vpnpool 172.16.1.1-172.16.1.10
pdm location Notes 255.255.255.255 inside
pdm location Streamline 255.255.255.255 inside
pdm location 24.215.4.204 255.255.255.255 outside
pdm location 66.195.71.182 255.255.255.255 outside
pdm location 10.3.1.6 255.255.255.255 inside
pdm location Exchange 255.255.255.255 inside
pdm location Netaccess2 255.255.240.0 outside
pdm location Netaccess1 255.255.255.255 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.0.0 0.0.0.0 0 0
static (inside,outside) tcp interface 3389 Streamline 3389 netmask 255.255.255.255 0 0
static (inside,outside) tcp interface pcanywhere-data Streamline pcanywhere-data netmask 255.255.255.255 0 0
static (inside,outside) tcp interface 5632 Streamline 5632 netmask 255.255.255.255 0 0
static (inside,outside) tcp 216.145.98.72 https Exchange https netmask 255.255.255.255 0 0
static (inside,outside) tcp 216.145.98.72 smtp Exchange smtp netmask 255.255.255.255 0 0
static (inside,outside) tcp 216.145.98.72 3101 Exchange 3101 netmask 255.255.255.255 0 0
static (inside,outside) tcp 216.145.98.72 pop3 Notes pop3 netmask 255.255.255.255 0 0
static (inside,outside) tcp 216.145.98.72 www Notes www netmask 255.255.255.255 0 0
static (inside,outside) tcp 216.145.98.72 lotusnotes Notes lotusnotes netmask 255.255.255.255 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 10.3.1.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 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 10.3.1.3
vpngroup vpngroup default-domain domain.com
vpngroup vpngroup split-tunnel vpngroup_splitTunnelAcl
vpngroup vpngroup idle-time 1800
vpngroup vpngroup password ********
telnet timeout 5
ssh 10.3.1.0 255.255.255.0 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
0
 
LVL 4

Expert Comment

by:ullas_unni
ID: 33682068
whats the private ip of your new exchange server and your old exchange server?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 23

Author Comment

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

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

Accepted Solution

by:
shirkan earned 500 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)
to
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 216.145.98.72 eq smtp
to access-list inbound permit tcp host Netaccess1  host 216.145.98.72 eq smtp
access-list inbound permit tcp Netaccess2 255.255.240.0 eq smtp host 216.145.98.72 eq smtp
to access-list inbound permit tcp Netaccess2 255.255.240.0 host 216.145.98.72 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 10.3.1.20 Exchange
name 10.3.1.4 Streamline
name 10.3.1.2 Notes
name 216.145.96.15 Netaccess1
name 64.18.0.0 Netaccess2
object-group network NetaccessGroup
  network-object Netaccess2 255.255.240.0
  network-object Netaccess1 255.255.255.255

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
0
 
LVL 23

Author Comment

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

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.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

If you have an ASA5510 then this sort of thing would be better handled with a CSC Module, however on an ASA5505 thats not an option, and if you want to throw in a quick solution to stop your staff going to facebook during work time, then this is the…
When I upgraded my ASA 8.2 to 8.3, I realized that my nonat statement was failing!   The log showed the following error:     %ASA-5-305013: Asymmetric NAT rules matched for forward and reverse flows It was caused by the config upgrade, because t…
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…
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…

828 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