[Cialug] IPTables

tony geerts thegreatland at yahoo.com
Wed Sep 6 21:32:44 CDT 2006


Your -D (delete) does not match a particular rule. You
must be specific. Iptables will not do wildcard
matching. That would be "dangerous."


-A, --append chain rule-specification
Append one or more rules to the end of the selected
chain.  When the source and/or destination names
resolve to more than one address, a rule will be added
for each possible address combination.

-D, --delete chain rule-specification
-D, --delete chain rulenum
Delete one or more rules from the selected chain.
There are two versions of this command: the rule can
be specified as a number in the chain (starting at 1
for the first rule) or a rule to match.

--
tony geerts

--- jcbailey at code0.net wrote:

> 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
> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Cialug mailing list