[CentOS] how to get iptables rule to log actions?

Rudi Ahlers rudiahlers at gmail.com
Mon Apr 6 12:06:47 UTC 2009


Hi all,

I need to block access to an external IP address, on CentOS 5 with
iptables, but can't seem to get it right.

I have the following options in /etc/sysconfig/iptables:


-A RH-Firewall-1-OUTPUT -d 87.89.180.50 -j LOG
-A RH-Firewall-1-OUTPUT -d 87.89.180.50 - j DROP

But when I restart iptables, I get the following errors:
Flushing firewall rules:                               [OK]
Setting chains to policy ACCEPT: filter       [OK]
Unloading iptables modules:                      [OK]
Applying iptables firewall rules: iptables-restore v1.3.5:  Couldn't
load target: 'RH-Firewall-1-OUTPUT':/lib/iptables/libipt_RH-Firewall-1-OUTPUT.so:
cannot open shared object file: no such file or directory.
                                                                [FAILED]


So, how can I block & log all outgoing traffic to this IP?

The server is off line, and I only have remote access via KVM-over-IP to it.



-- 

Kind Regards
Rudi Ahlers


More information about the CentOS mailing list