[Discuss] Limit the number of ip addresses which can connect to a port

Dale R. Worley worley at alum.mit.edu
Tue Oct 31 21:43:30 EDT 2017


> From: Tom Luo <mariolzx at gmail.com>
>
> I am running a service in Ubuntu on a port. I try to limit the number of ip
> addresses which can connect to the port. For example, if the limit is set
> to 1, only connect from on ip address is allowed.
> If there is a connection from another ip address, it will be declined.

As Richard Pieri says, you could have your application impose this
restriction.

It would be straightforward for a firewall to implement such a
restriction -- if anyone ever wanted a firewall to do so.

But it's really a rather odd restriction you're trying to implement.
It's not clear to me what circumstances would make such a restriction
desirable/useful.  Maybe if you explained the reasons, we might be able
to suggest an alternative that would be easier to implement and just as
useful.

Dale



More information about the Discuss mailing list