I have a server app i’m playing with. I bind the address to 127.0.0.1 and it was fine until i wanted to connect from a client inside a VM. So i bind it to 192… Well now my test which all connect to 127… can’t connect. I know i could use Any but i don’t want the outside internet connecting (I know i could use firewalls but ATM i dont want to).
Is there a way i can specify any local address so 192.x.x.x and 127.0.0.3 work?
When specifying your local address, use IPAddress.Any instead of an explicit address. See the previously answered question, too: TcpListener: How to listen on specific port on all interfaces?