Linux iptables blocking IP address


You do a netstat -an and see a raft of connections to your apache host, coming in at 10 – 20 a second.

It shows ::ffff: ::ffff: in netstat output. These are IPV6 connections AFAIK.

Also you see ::1 – – [DD/MMM… in apache log. Restarting apache does nothing, the connections just reappear.


You need to block all connections from this IP address using iptables. See example tab.


cp -i /etc/sysconfig/iptabes /etc/sysconfig/iptables.$(date +%j).bu
vi /etc/sysconfig/iptables

Add a line like the one below:


Then restart iptables like this: /etc/init.d/iptables restart as root.

Finally check your rules like this: /etc/init.d/iptables status as root.


[tags]Linux Security, Linux iptables, Fedora Core iptables, Linux Firewall, Unix Coding School[/tags]

Previous Post

Comment (1)

  1. […] UNIX Coding School ยป Linux iptables blocking IP address (tags: Linux Security Iptables Fedora Core Firewall UNIX Coding School) Subscribe to techie blogs central by Email […]

Leave a Reply

Your email address will not be published. Required fields are marked *