PDA

View Full Version : Shell script to block IP im iptables


cafdesigner
04-02-2006, 07:26 PM
Hello...
Somebody has a Shell script to block IP im iptables?...
... With a dialog box asking for the IP that I want to block...

Rick
04-02-2006, 07:28 PM
Hi, use this one-line command.

iptables -I INPUT -s 25.55.55.55 -j DROP

just replace 25.55.55.55 with the IP to block.

cafdesigner
04-02-2006, 07:34 PM
yes i know... but I wanted one script therefore I will be using laypeople who will go to execute...

alexr
04-02-2006, 07:56 PM
You know CPANEL has an IP blocking feature?

cafdesigner
04-02-2006, 08:19 PM
Not wise person! Which the way of this tool?

david
04-08-2006, 02:36 AM
You could try using a GUI like fwbuilder (http://www.fwbuilder.org), it'll push the ruleset remotely once configured. The only thing is that you need to somehow disable anything related to the modules not available for VPS (like ipt_log, and ipt_state)

hakeem_mah
04-11-2006, 11:11 AM
Try APF which was developed by R-fx Networks -- http://www.rfxnetworks.com/apf.php.

It is a free ware and many big Linux hosting companies use this for securing their site. Do update me if you want any clarification with it.

Regards,
Abdul Hakeem

Cobra
04-11-2006, 12:30 PM
Check the security forum, APF won't work presently, but the extra modules needed for iptables are being added. When they are, then APF will work.