|
Blocking Incoming e-mail from a domain using iptables
I tried a search but could not find exactly what I am looking for. There is a site that is constantly sending e-mail to my GroupWise e-mail server at a clients site. I am using a Mandake box using iptables to handle the firewall.
Let's say the domain sending the e-mail is bademaildomain.com
I do not know the addy for the smtp relay so I want to block the whole domain. (Unless there is a way to find this?) Either way I would like to know how to block an entire domain.
I also get confused with OUTPUT and INPUT. At this point I could care less if people wanted to browse their web page etc, so outgoing requests originating inside my firewall should have access to the domain. I am using stateful packet inspection, will this allow it back in? If not I don't mind blocking it in both directions.
Would this work?
iptables -A OUTPUT -i $INTERNET -s bademaildomain.com -j DROP
$INTERNET is my port going out to the Internet.
Thanks,
Zych
|