[HELP] Iptables - block multiconnection from the same ip

Nov 18, 2005 1 Replies

I need to block connections on port 23 (or other...) from an IP when it try to open more than one connection...



In other words the ip xxx.xxx.xxx.xxx might open only one telnet session at time...



I don't want 2 or more connection from the same ip... only one...



Is that possible using itables rules? Could you help me?


~oma


From the iptables manual page:

iptables -p tcp --syn --dport 23 -s xxx.xxx.xxx.xxx -m connlimit --connlimit-above 1 -j REJECT

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required