Skip to main content

Thread: iptables & nat = hitcount recent


i have problem setting iptables nat , -m recent hitcount, doesnt work, here exampel without nat works fine:

code:
$ipt -a input -m recent --name floodhost --set -p tcp --dport 22 -d $ip_fw $ipt -a input -m recent --name floodhost --rcheck --seconds 600 --hitcount 4 -p tcp --dport 22 -d $ip_fw -j logflood
which bans 10minutes connects more 3 times ssh, want same prerouting, wont work:

code:
$ipt --table nat -a prerouting -p tcp -m multiport --dports 25,110,443 -j dnat --to $ip_exchange $ipt -a forward -m recent --name floodnat --set -p tcp -m multiport --dports 25,110,443 -d $ip_exchange $ipt -a forward -m recent --name floodnat --rcheck --seconds 20 --hitcount 4 -p tcp -m multiport --dports 25,110,443 -d $ip_exchange -j logflood
i can connect once via telnet port 25, , banned, doesnt work quiet well. how can use --rcheck prerouting , forward let's 5 connections per 20 seconds allowed?



Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] iptables & nat = hitcount recent


Ubuntu

Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support