Iptables connection limiting
I'm a near-total Linux newbie, and for now, this is just a proof-of-concept question: is it possible to create such a block with iptables, that limits the number of incoming connections, not from a single IP or a known range, but from a wildcard range.
The goal would be to create a firewall that allows only a preset number of IPs, say 250, to connect to it's network out of many, say 10.000, while sending the others to a predefined page, but the IPs would not be known in advance(hence the need for being able to do all this with wildcards). Then once an IP of the first 250 disconnects, the next to attempt would be allowed, while the one after it redirected.
Was this understandable? :D
Thank you in advance,