Brute force attacks... iptables not running??

csgo

Verified User
Joined
Feb 29, 2012
Messages
47
I have followed the instructions at http://help.directadmin.com/item.php?id=380 on automatically blocking Brute Force Attacks. The blocked IP Addresses are listed in /root/blocked_ips.txt but I don't think iptables is working properly.

If I issue the following command (as root): /etc/init.d/iptables restart I get the following output:
[root@redacted init.d]# iptables restart
Bad argument `restart'
Try `iptables -h' or 'iptables --help' for more information.

I have the Brute Force threshold set at 20, but there are many, many more from the same IP Address.

I'm new to CentOS and DirectAdmin. Any help is GREATLY appreciated.

Thanks,
-Joe
 
I issued the command "iptables restart" at the command prompt in the /etc/init.d directory.

The output from that command is:
Bad argument `restart'
Try `iptables -h' or 'iptables --help' for more information.

Thanks,
-Joe
 
You should run it either as

Code:
/etc/init.d/iptables restart

or

Code:
cd /etc/init.d/
./iptables restart


Note, these forums are not the right place to learn bases of Linux administrating, using of Directadmin requires that you already know at least minimum of the subject.
 
You should run it either as

Code:
/etc/init.d/iptables restart

or

Code:
cd /etc/init.d/
./iptables restart


Note, these forums are not the right place to learn bases of Linux administrating, using of Directadmin requires that you already know at least minimum of the subject.

I think I know more than the minimum, and the question remains. Both of the examples you give end up with the same negative results:

[root@redacted /]# /etc/init.d/iptables restart
-bash: /etc/init.d/iptables: Permission denied

[root@redacted /]# cd /etc/init.d/
[root@redacted init.d]# ./iptables restart
-bash: ./iptables: Permission denied
[root@redacted init.d]#
 
Sure, you know.

And what you see
Code:
ls -la /etc/init.d/iptables

?

[root@redacted /]# ls -la /etc/init.d/iptables
-rw-r--r-- 1 root root 10074 Dec 20 09:05 /etc/init.d/iptables
[root@redacted /]#

Appreciate your help!

-Joe
 
Code:
chmod 755 /etc/init.d/iptables

should solve the issue of yours.

That solved most of the problem! Still some errors, but I can tell iptables is now working.

Thanks much!
-Joe
 
Back
Top