I have a server application with a listening socket opened on a specific IP port.
How can I allow the socket to enable incoming connections from just one specified IP address?
I have a server application with a listening socket opened on a specific IP
Share
You’ll have to either use some firewall software to restrict incoming requests to that port, or shut down accepted connections that you do not want to service (based on the socket address returned by
accept).There might be libraries out there that do that for you, but the socket API doesn’t have anything to do it automatically.