Thread: iptables & nat = hitcount recent
i have problem setting iptables nat , -m recent hitcount, doesnt work, here exampel without nat works fine:
which bans 10minutes connects more 3 times ssh, want same prerouting, wont work: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
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?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
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] iptables & nat = hitcount recent
Ubuntu
Comments
Post a Comment