iptables + fedora4

Neil Cherry ncherry at comcast.net
Tue Nov 29 02:01:50 UTC 2005


Jonathan Carpenter wrote:
> I am trying to block spammers with iptables but I am also wanting to log 
> each dropped connection
> my syntax is
> 
> iptables -I INPUT -s 222.251.0.0/17 <http://222.251.0.0/17> -j DROP
> 
> How could I change this syntax so that it sent me some sort of 
> information to the /var/log/messages or some other log
> file so that I could make sure it was working?
> 
>               Thanks
> 
> -- 
> Jonathan Carpenter
> Linux System Administrator
> Windows System Administrator
> <The Unix Geek>
> 

Maybe try adding this:

-j LOG --log-level alert --log-prefix "SPAM deny: " --log-ip-options

Use man to give further details.

-- 
Linux Home Automation         Neil Cherry       ncherry at linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site




More information about the fedora-list mailing list