PF Limit connections per ip per port udp/tcp.

bryn1u

Well-Known Member

Thanks: 9
Messages: 336

#1
Hello,
Im trying set to limit connections per ip for ssh and voice server.
1)
TCP - SSH
Code:
 stossh  ="(max 30,    source-track rule, max-src-nodes 75,  max-src-conn-rate  6/200, overload <bruteforce> flush global)"
 pass in on $ext_if proto tcp from any to any port { 22 } $stossh
2)
UDP - Voice server Murmur.
Code:
stovoice ="(max 30, max-src-conn-rate  6/200, overload <bruteforce> flush global)"
 pass in on $ext_if proto udp from any to any port { 64738 } $stovoice
Is it right ? Shoud i undrestand, max global connections is 30 for ssh port 22 and more then 6 connections per ip in 200 seconds is banned ? I need to restrict 5 connections per ip. How can i do that ?
What about udp. Udp protocol can't be track so second rule is right ?
Thank you.
 
Top