IPtables need help

Status
Not open for further replies.

ghandi

Active Member
38
2012
1
0
Hello I need help with some iptables commands.

So I would like to allow only 2 connection to a specific port. But I want that some IP Addresses can connect mor than 2 times

For example: IP: 1.2.3.4 or any other ip can only connect 2 times at the same time to port 80 but a specific IP can connect 20 times to this port.

How can I do that?

Is this command right?
/sbin/iptables -A INPUT -p tcp --syn --dport 80 -d ! 1.2.3.4 -m connlimit --connlimit-above 2 -j REJECT --reject-with tcp-reset

But how can I add mor ip addresses that can connect more than 2 times?
In my command there is only 1 ip adresse that could connect more than 2 times.


I hope you understand me and could help me :)
 
Status
Not open for further replies.
Back
Top