Web Hosting Talk







View Full Version : iptables commans needed urgunly pleeeeze


mostaman
12-19-2002, 05:23 PM
Thanks in advance :)

1- Command to remove an IP entered in an error using this command:

iptables -A INPUT -s XXX.XXX.XXX.XXX. -d 0/0 -j DROP

2- is it possible at all to insert a wild card in the IP to be dropped like: XXX.XXX.XXX.% (is the wild card % or *)??

thanks again

Mdot
12-19-2002, 06:15 PM
you can't use "*" in iptables. instead if you want range of IPs you need to use CIDR format, for example 155.55.35.* will be 155.55.35.0/24

Miha.

Mdot
12-19-2002, 06:17 PM
Originally posted by mostaman

1- Command to remove an IP entered in an error using this command:

iptables -A INPUT -s XXX.XXX.XXX.XXX. -d 0/0 -j DROP


This is incorrect command to delete rule. First do "iptables -L INPUT -n --line-numbers" then you will see the rule's # and to delete this rule use "iptables -D INPUT #"

Miha.

mostaman
12-19-2002, 10:07 PM
Thanks so much Miha, all sorted :)

I hope one day I will be helping others