I have created a C++ server for a local use.
It does not have authentication system.
The problem is other computers can easily connect to this server by my IP and port.
How can I limit this server to only my local browsers.
When you are binding the port for the service just specify the interface IP as: 127.0.0.1
instead of 0.0.0.0
.
Here is a reference about the INADDR_ANY
.
Without sample code I am guessing that you have bound the interface with INADDR_ANY
.
127.0.0.1
instead of0.0.0.0
.