Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I typically use 0.0.0.0 rather than 127.0.0.1, then it's not even reachable.


Genuine question, it can't possibly be reachable on 127 anyway can it?

Put another way, what's the difference between 0 and 127 here? What makes it safer? TIA


Not OP but read about it on this hosts config [0].

From that page:

> We prefer to use 0.0.0.0, which is defined as a non-routable meta-address used to designate an invalid, unknown, or non applicable target.

> Using 0.0.0.0 is empirically faster, possibly because there's no wait for a timeout resolution. It also does not interfere with a web server that may be running on the local PC.

[0] https://github.com/StevenBlack/hosts


For 127.0.0.1 it will try to connect and fail, either right away or on timeout depending on the on-box firewall setup.

For 0.0.0.0 it won't even try to connect (or fail instantly depending on how you look at it).


I usually have a web server running on posts 80 and 443 on my local machine. Using 127.0.0.1 will make requests to Facebook end up there, which is not necessarily what you want.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: