- Mar 7, 2019
- 1,596
- 1,448
- 459
I was just worried since ports are essentially the entrance to my PC
furthermore, an app listening on a port doesnt necessarily mean its accessible from the outside. listening happens on a port on an ip.That is true, but... If you're behind a modem with built-in router, you would have to have made a port mapping first to this particular port for it to be open for external access. So you're only concern would be if another process already on your computer can access it.
if you listen on port 57095 on ip 0.0.0.0, then that means it is listening on all ip addresses and all network cards, meaning that devices that can reach your device can also reach the port. so listening on 57095 on 0.0.0.0 would mean other devices in your local network can access the port, and if you also setup port forwarding on the modem then it would be accessible from the wider internet (unless there is multi layer nat going on and your isp assigns the same public ip address to the whole neighborhood).
however, if you listen on port 57095 on localhost (ip 127.0.0.1), then only the same pc can access it. this is what f95checker does. programs running on the same pc have access to that pc's 127.0.0.1 address and thus can connect to that port. devices on the local network cannot. they have their own 127.0.0.1 that refers to themselves. and by consequence, even if you port forwarded 57095 from your modem to your pc, connections from the outside internet would reach your pc and then fail since there is nothing listening on your lan ip on port 57095, there is only on localhost port 57095.
with linux, you can easily see this difference with "sudo ss -tulnp", where you will see some programs listening on 0.0.0.0:some-port meaning all network interfaces can reach it, 127.0.0.1:some-port meaning only the local pc can reach it, and local-ip:some-port meaning only devices connected to the network for that specific network card can reach in (in case you only have 1 network card, this is equivalent to listening on 0.0.0.0)