Help - Search - Members - Calendar
Full Version: Iptables commands help
The Planet Forums > Control Panels > cPanel/WHM
mickalo
Hello,

I am trying to find out if there is an IP being block/listed in iptables and if so, how to remove it.

What is the command line to

1) to see if a IP is being blocked

and

2) the command to remove the IP being block, is listed

the last time I messed with Iptables, the server locked up on me and had to request a reboot, so wanted to make sure I am using the correct command line options.

TIA,
Mickalo
jgreyna
Hi,

To list the iptables rules loaded type:

$ iptables -L

In the output find the IP that you need.

To remove the rule, you need type the complete command whit the option -D, and the chain for example.

iptables -D INPUT -s 10.10.10.10/32 -j DROP

The option -j can be DROP or REJECT.

Also, check if in the file /etc/hosts.deny exist the IP Address, in this file, you can add IP Addresses to block.

Regards.
mickalo
QUOTE (jgreyna)
Hi,

To list the iptables rules loaded type:

$ iptables -L  

In the output find the IP that you need.

To remove the rule, you need type the complete command whit the option -D, and the chain for example.

iptables -D INPUT -s 10.10.10.10/32 -j DROP

The option -j can be DROP or REJECT.

Also, check if in the file /etc/hosts.deny exist the IP Address, in this file, you can add IP Addresses to block.

Regards.


Thx's jgreyna

this helps alot! icon_wink.gif last time I messed with iptables, locked up the server, just wanted to double check.

Mickalo
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.