I'm having no end of trouble attempting block a single IP and a range of IP addresses using information found at
http://wiki.contribs.org/Firewall. Specifically, the section that describes who to Block incoming IP address. I've followed the instruction on that page exactly as written however I'm unable to restart masq without errors. My custom template is stored in the /etc/e-smith/templates-custom/etc/rc.d/init.d/masq as described in the wiki. The template file is named 40DenyRiffRaff and contains two lines;
/sbin/iptables -A INPUT -s 37.140.141.0/24 -j DROP
/sbin/iptables -A INPUT -s 58.218.199.250 -j DROP
After saving the above noted file I execute the commands;
/sbin/e-smith/expand-template /etc/rc.d/init.d/masq
/etc/init.d/masq restart
This results in the an error;
Shutting down IP masquerade and firewall rules: Done!
'nabling IP masquerading: iptables v1.3.5: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `/sbin/iptables'
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
done
I've checked my entries several times and have tried one line at a time however the above noted error or a similar error occurs;
Shutting down IP masquerade and firewall rules: Done!
Enabling IP masquerading: Bad argument `/sbin/iptables'
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
done
I have searched the FAQ's and Googled the error without resolve. Please advise what I might be doing incorrectly so that I may correct my error and block the offending IP's from pounding on my server.
With appreciation