Solved

PIX 506 - Adding rule to disallow SMTP?

Posted on 2006-06-18
5
250 Views
Last Modified: 2006-11-18
I have been trying to figure out how to add a rule to my PIX to disallow all SMTP traffic except it it comes from my internal mail server (192.168.1.1).  I can't seem to get it working correctly through the PDM, due to wrong order/rules/whatever I can't seem figure out.  Here is my current access list, with everything working great, except I want to dissallow all SMTP traffic except from 192.168.1.1.

Result of firewall command: "show config"
 
: Saved
: Written by enable_15 at 01:48:23.230 PDT Sun Jun 18 2006
PIX Version 6.3(4)
interface ethernet0 10baset
interface ethernet1 10baset
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password ************* encrypted
passwd ********** encrypted
hostname *******
domain-name *******
clock timezone PST -8
clock summer-time PDT recurring
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 pptp 1723
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.0 Priv-Network
name 192.168.1.1 Priv-mailSrvr
name 192.168.1.13 Priv-webSrvr
name 192.168.1.3 Priv-TSrvr
name 192.168.1.10 COINDev
name 192.168.1.11 COINPro
object-group service Webmin tcp-udp
  port-object range 10000 10000
access-list acl_out permit icmp any any
access-list acl_out permit tcp any host xxx.xxx.xxx.186 eq smtp
access-list acl_out permit tcp any host xxx.xxx.xxx.186 eq www
access-list acl_out permit tcp any host xxx.xxx.xxx.186 eq pop3
access-list acl_out remark RPC HTTP TCP
access-list acl_out permit tcp any host xxx.xxx.xxx.186 range 6001 6004
access-list acl_out remark RPC HTTP UDP
access-list acl_out permit udp any host xxx.xxx.xxx.186 range 6001 6004
access-list acl_out remark COINDev SSH
access-list acl_out permit tcp any host xxx.xxx.xxx.187 range 10022 10022
access-list acl_out remark COINDev SSH
access-list acl_out permit tcp any host xxx.xxx.xxx.187 range 10080 10080
access-list acl_out remark COINPro SSH
access-list acl_out permit tcp any host xxx.xxx.xxx.187 range ssh ssh
access-list acl_out remark COINPro WWW
access-list acl_out permit tcp any host xxx.xxx.xxx.187 range www www
access-list acl_out remark COINPro WWW
access-list acl_out permit tcp any host xxx.xxx.xxx.187 range 10000 10000
access-list acl_out permit tcp any host xxx.xxx.xxx.185 eq ftp
access-list acl_out permit tcp any host xxx.xxx.xxx.185 eq smtp
access-list acl_out permit tcp any host xxx.xxx.xxx.185 eq www
access-list acl_out permit tcp any host xxx.xxx.xxx.186 eq https
access-list acl_in permit icmp any any
access-list acl_in permit ip any any
access-list 101 permit ip Priv-Network 255.255.255.0 192.168.254.0 255.255.255.0
pager lines 50
logging on
logging timestamp
logging standby
logging trap errors
logging history debugging
logging host inside Priv-mailSrvr
mtu outside 1500
mtu inside 1500
ip address outside xxx.xxx.xxx.184 255.255.255.0
ip address inside 192.168.1.254 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool pixVPNpool 192.168.254.10-192.168.254.25
pdm location Priv-mailSrvr 255.255.255.255 inside
pdm location 192.168.0.0 255.255.0.0 inside
pdm location 192.168.254.0 255.255.255.0 outside
pdm location Priv-webSrvr 255.255.255.255 inside
pdm location Priv-TSrvr 255.255.255.255 inside
pdm location COINDev 255.255.255.255 inside
pdm location COINPro 255.255.255.255 inside
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list 101
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) xxx.xxx.xxx.187 10022 COINDev 10022 netmask 255.255.255.255 0 0
static (inside,outside) tcp xxx.xxx.xxx.187 10080 COINDev 10080 netmask 255.255.255.255 0 0
static (inside,outside) tcp xxx.xxx.xxx.187 ssh COINPro ssh netmask 255.255.255.255 0 0
static (inside,outside) tcp xxx.xxx.xxx.187 www COINPro www netmask 255.255.255.255 0 0
static (inside,outside) tcp xxx.xxx.xxx.187 10000 COINPro 10000 netmask 255.255.255.255 0 0
static (inside,outside) xxx.xxx.xxx.186 Priv-mailSrvr netmask 255.255.255.255 0 0
static (inside,outside) xxx.xxx.xxx.185 Priv-webSrvr netmask 255.255.255.255 0 0
access-group acl_out in interface outside
access-group acl_in in interface inside
route outside 0.0.0.0 0.0.0.0 69.30.69.1 1
route inside 192.168.0.0 255.255.0.0 192.168.1.254 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 1:00:00 udp 0:04:00 rpc 1:00:00 h225 1:00:00
timeout h323 0:10:00 mgcp 0:10:00 sip 0:30:00 sip_media 0:04:00
timeout uauth 0:10: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 Priv-Network 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
sysopt connection permit-pptp
sysopt connection permit-l2tp
crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto dynamic-map dynmap 10 set transform-set ESP-DES-MD5
crypto map mymap 65535 ipsec-isakmp dynamic dynmap
crypto map mymap 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 ***** address-pool pixVPNpool
vpngroup ***** split-tunnel 101
vpngroup ***** idle-time 1800
vpngroup ***** password ********
telnet Priv-Network 255.255.255.0 inside
telnet timeout 5
ssh xxx.xxx.xxx.0 255.255.255.128 outside
ssh timeout 5
console timeout 0
terminal width 80
Cryptochecksum:
0
Comment
Question by:aconway
  • 3
  • 2
5 Comments
 
LVL 79

Accepted Solution

by:
lrmoore earned 500 total points
Comment Utility
Let's start this one over:
From the command line tool, multi line command window, cut/paste the following:

no access-group acl_in in interface inside
no access-list acl_in
access-list block_smtp permit tcp host 192.168.1.1 any eq 25
access-list block_smtp deny tcp any any eq 25
access-list block_smtp permit ip any any
access-group block_smtp in interface inside

You don't need to permit icmp because it is implicit in "ip"
 
0
 

Author Comment

by:aconway
Comment Utility
I paste the first command and get:

"Type help or '?' for a list of available commands"

(I am in enable mode at the prompt, BTW)
0
 

Author Comment

by:aconway
Comment Utility
Ok, so I cut and pasted that into the multi command line interface and... I didn't get any sort of good or bad messages..

I saved the config to flash and checked the PDM and I see no new rules in there at all..

0
 
LVL 79

Expert Comment

by:lrmoore
Comment Utility
Did you refresh the PDM?
Use File|show running config in new window and see if it is there...
0
 

Author Comment

by:aconway
Comment Utility
Ah, yes, I see it now!  It all appears to work properly too!  Thanks!

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Do you have a windows based Checkpoint SmartCenter for centralized Checkpoint management?  Have you ever backed up the firewall policy residing on the SmartCenter?  If you have then you know the hassles of connecting to the server, doing an upgrade_…
To setup a SonicWALL for policy based routing to be used with the Websense Content Gateway there are several steps that need to be completed. Below is a rough guide for accomplishing this. One thing of note is this guide is intended to assist in the…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now