[lug] IPCHAINS RULES

Sean Reifschneider jafo at tummy.com
Thu Sep 7 11:03:00 MDT 2000


On Thu, Sep 07, 2000 at 11:00:53AM -0600, nunar at mauromedia.net wrote:
>I\'m not too familiar with the setting of rules in IP 
>chains. How would I go about blocking port 25 from 
>everybody outside my network?

(assuming you have no other rules)

MYNET=10.9.8.0/24
MYIP=10.9.8.7
ipchains -F input  # flush existing rules
ipchains -A input -p tcp -s "$MYNET" -d "$MYIP" 25 -j ACCEPT
ipchains -A input -p tcp -d "$MYIP" 25 -j DENY --log

Sean
-- 
 <h3x> FreeBSD 4 does IPV6 by default now.
 <Warik> NT has stability, by default now.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python




More information about the LUG mailing list