Help - Search - Members - Calendar
Full Version: iptables - ipchains question...
The Planet Forums > System Administration > General Support Questions
Shortfork
A little confused here.. running iptables on one machine, ipchains on another.. I'm pretty familiar with ipchains.. not so much so with iptables..

if this command works for ipchains to block a range from a specific port, then log any attempted connections to that port from that range.. (port # and ip hidden for security and privacy icon_wink.gif)

ipchains -A input -i eth0 -p tcp --source ***.***.***.**/9 --destination-port ## --syn -j DENY -l

I *think* I have the the DENY versus DROP part down as well as everything left of -j..

Problem I have is, if I change everything to as I understand it. I'm having a problem getting logging of the connect attempt to work... ie: -l does not work and any other variation of same that I've tried from man iptables has me stumped..

Anyone care to translate the above rule into iptables for me? I can then translate all my other rules using that example..

TIA

Shortzz
simonmay
You need to make a table that logs and then drops the packet

iptable -N log_and_drop
iptable -A log_and_drop -j LOG --log-level warning
--log-prefix "bad packet:"
iptable -A log_and_drop -j DROP

iptable -A input -i eth0 -p tcp --source ***.***.***.**
--destination-port ## --syn -j log_and_drop

read
http://iptables-tutorial.frozentux.net/ipt...s-tutorial.html
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-2010 Invision Power Services, Inc.