No go. Still doesn't work when I reverse it. But I'm almost positive that the order of application is forward, not backward. I have, other times, performed similar commands. This time it doesn't seem to be working.
Main Topics
Browse All TopicsWe are having a problem wherein a host on our network is sporadically connecting and sending spam to the Internet. The address he is transmitting from indicates that he is somewhere on the internal network and being NATed to one of our external addresses. I need to stop this from occuring. So here is what I want to do.
I want to disable SMTP on our PIX EXCEPT for a single server whose IP address I want to allow. I tried using the following commands:
outbound 1 deny 0.0.0.0 0.0.0.0 25 tcp
This command effectively stops all SMTP outbound traffic great. Then I tried to enable the one server to be able to send SMTP:
outbound 1 permit 192.168.1.1 255.255.0.0 25 tcp
But this does not seem to work. I was under the impression that the PIX took commands in order. So, if I do a global deny of SMTP, then make a SPECIFIC permission for a host to allow SMTP below that, the allow permission will overrule the global deny.
What is the answer here? I need to stop the spam, but make sure the SMTP server can still send messages. How can I make an exception for just one server to send outbound SMTP, block all incoming SMTP (to prevent our server from being used to bounce email), and keep SMTP outbound blocked for all other computers on the network?
Thanks in advance.
James
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I'll take your word on that then...I'm an iptables & ipchains guy and I know those rules are taken top to bottom/first to last, and the first rule that matches is what gets applied (so in your case the deny all would get hit/applied first; the specific allow rule would never get tested). I've only read about PIX here and there tho, mostly in these forums...never typed a command in one.
Wish I could help but good luck regardless!
If you want to accept inbound from a specific ip address, use line one; otherwise replace the permit with deny and the large Xs with any (just like line 2)
access-list outside_in permit tcp XXX.XXX.XXX.XXX 255.255.255.255 host xxx.xxx.xxx.xxx eq smtp
access-list outside_in deny tcp any host xxx.xxx.xxx.xxx eq smtp
The following is if you use 2 servers for email, one in the DMZ, one in the LAN.
access-list dmzM_in permit tcp host xxx.xxx.xxx.xxx host YYY.YYY.YYY.YYY eq smtp
access-list dmzM_in permit tcp host YYY.YYY.YYY.YYY host xxx.xxx.xxx.xxx eq smtp
The following allows the dmz mail server to deliver anywhere
access-list dmzM_in permit tcp host xxx.xxx.xxx.xxx any eq smtp
The following kills all smtp from the LAN
access-list inside_in deny tcp any any eq smtp
What version PIX OS are you using? the outbound/apply commands have been replaced with access-lists on anything above 6.0
The PIX does not evaluate any one rule against another one. It accepts a match on the first one it comes to when processed top down.
Consider your example
outbound 1 deny 0.0.0.0 0.0.0.0 25 tcp
outbound 1 permit 192.168.1.100 255.255.255.255 25 tcp
outgoing packets from 'authorized' mail host 192.168.1.100 will never be allowed because the packet will hit the deny all first.
You can replace that with the permit first:
no outbound 1
outbound 1 permit 192.168.1.100 255.255.255.255 25 tcp
outbound 1 deny 0.0.0.0 0.0.0.0 25 tcp
Or, you can use an access-list if you are using a newer PIX OS, as gpriceee provided an example for in the post above...
I'd take gpriceee's suggestions about the access lists, they seem dead on and identical to what I'm using in our network today. The only addition I have is make sure you don't forget to add the access-lists to the correct interface.
access-group outside_in in interface <outside>
access-group dmzM_in in interface <dmz>
access-group inside_in in inferface <inside>
Another thought here...maybe you should look into locking your mail server down to prevent it from being an open relay as well.
Not sure how to "lock" a Windows 2003 Server with the SMTP service enabled. It's not a mail server, per se, but rather it's an SMTP provider so that our intranet site can relay mail to our users. Our mail server is external and not controlled by me. That's why I'm using the built-in SMTP service provided by Win2K3.
lrmoore....to reply to your post, that was what fixnix suggested, so I tried implmenting the commands in reverse order just as you had them:
outbound 1 permit 192.168.1.100 255.255.255.255 25 tcp
outbound 1 deny 0.0.0.0 0.0.0.0 25 tcp
And it still blocked ALL SMTP traffic, including that address I wanted to allow. As far as version...I'm not sure. We have some access list commands in there as well, so I know they both work. I'm still a little hazy on how they work so I still use the conduit and outbound statements more.
James
Here's how the relay works: http://support.microsoft.c
Business Accounts
Answer for Membership
by: fixnixPosted on 2005-04-01 at 08:53:44ID: 13682364
I believe "taking commands in order" means the first rule that matches is applied...backwards from how I interpreted your explanation. Try putting the explicit allow rule first, then a global deny.