[Nottingham] Linux number of forwarded net connections limit

Martin martin at ml1.co.uk
Tue Oct 11 13:16:47 UTC 2011


Folks,

Anyone know this one?


For a Linux box acting as a gateway between two networks, how can I
limit the maximum number of simultaneous connections between the two
networks? (No NAT, connecting two network segments with different IP
ranges.)

Or if it is doing NAT, can I limit the maximum number of NAT entries
to refuse additional connections gracefully?

And... Can I prioritise certain destination ports over others for
being allowed one of the limited number of forwardings?


There is "tc" which is ideal for doing bandwidth management. Is there
any similar trickery for the maximum number of network
connections/forwards?

Aside: Out of curiosity, how many simultaneous connections can a Linux
kernel handle? What is the limiting factor?


Cheers,
Martin



More information about the Nottingham mailing list