TARPIT question (more info)
Hello,
As I wrote in my previous message I'd like to use the TARPIT feature as much as possible.
I have a working setup for unused priviliged ports that looks somewhat like this:
for tarpitports in 21 23 25 42 79 81 110 137 138 139 445 901; do
$path_iptables -t raw -A PREROUTING -i $ext_if -d
$ext_ip -p tcp --dport $tarpitports -j NOTRACK
$path_iptables -t raw -A PREROUTING -s $ext_ip -p
tcp --sport $tarpitports -j NOTRACK
$path_iptables -A INPUT -s 0.0.0.0/0 -d $ext_ip -i
$ext_if -p tcp -m tcp --dport $tarpitports -j TARPIT
$path_iptables -A INPUT -s 0.0.0.0/0 -d $ext_ip -i
$ext_if -p tcp -m tcp --dport $tarpitports -j LOG-INPUT # just in case
done
Untracking the ports makes the situation safe for
conntrack.
Now I also want to use the tarpit feature for ports > 1023.
Who can help me here?
Please post!
Kind regards,
Udo
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
Quoted 12 lines
for tarpitports in 21 23 25 42 79 81 110 137 138 139 445 901; do
$path_iptables -t raw -A PREROUTING -i $ext_if -d $ext_ip(quoted diff) +0
-4-p tcp --dport $tarpitports -j NOTRACK $path_iptables -t raw -A PREROUTING -s $ext_ip -p tcp --sport $tarpitports -j NOTRACK $path_iptables -A INPUT -s 0.0.0.0/0 -d $ext_ip -i $ext_if -p tcp -m tcp --dport $tarpitports -j TARPIT $path_iptables -A INPUT -s 0.0.0.0/0 -d $ext_ip -i $ext_if -p tcp -m tcp --dport $tarpitports -j LOG-INPUT # just in case done
Quoted 4 lines
Untracking the ports makes the situation safe for conntrack.
Now I also want to use the tarpit feature for ports > 1023. Who can help me here?
Maybe you can do something with the mport patch :
http://www.netfilter.org/patch-o-matic/pom-base.html#pom-base-mport
Ofcourse, you need to patch the kernel for that to work.
Gr,
Rob