[Cialug] IPTables
jcbailey at code0.net
jcbailey at code0.net
Wed Sep 6 11:24:10 CDT 2006
Working on a firewall script for iptables and openvpn. I'm using a script
with learn-address to add/delete rules as needed. The only issue is that I
can't seem to delete a rule via wildcard (as in all input rules from the
source of 10.8.0.6). Any way to do this with iptables, or is that a lost
cause? Here's what the script is running for the add/delete (what I'd
like..)
Add:
iptables -A INPUT -s 10.8.0.6 -d 192.168.192.9 -p udp --dport 53 -j ACCEPT
iptables -A INPUT -s 10.8.0.6 -d 192.168.192.9 -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -s 10.8.0.6 -d 10.121.9.121 -p tcp --dport 5900 -j ACCEPT
iptables -A INPUT -s 10.8.0.6 -j REJECT
Delete:
iptables -D INPUT -s 10.8.0.6
Jon
More information about the Cialug
mailing list