Sometimes you want to have a server-client relationship only on your server, ie. only localhost
.
But it seems that once you open a port to listen, it is also available on the internet. So if you avoid a password to a server with root privileges, the server seems to be open to everyone on the internet.
How do you restrict a server to connections from localhost
only or in other words, have an internal network, where you can only communicate within even though the machine has internet access?