Hacking Linux Exposed

About
Authors
Contents
Reviews
Foreword
Purchase

Articles
Books
Sourcecode
Tools
Errata

Home

 


(view this code in a separate window)

# if using ipchains
/sbin/ipchains -A -p udp -s 192.168.1.50 --destination-port 177 -j ACCEPT
/sbin/ipchains -A -p tcp -s 192.168.1.50 --destination-port 177 -j ACCEPT
/sbin/ipchains -A -p udp --destination-port 177 -j DENY
/sbin/ipchains -A -p tcp --destination-port 177 -j DENY

# Or if using Netfilter:
/sbin/iptables -A -p udp -s 192.168.1.50 --destination-port 177 -j ACCEPT
/sbin/iptables -A -p tcp -s 192.168.1.50 --destination-port 177 -j ACCEPT
/sbin/iptables -A -p udp --destination-port 177 -j DROP
/sbin/iptables -A -p tcp --destination-port 177 -j DROP