News for hackers. Stuff that matters.
Re:I can see your local web servers by bg0 on Tuesday May 28, 2019 @10:05AM (#20030102)
Anyone know if this can be done on a hosts level instead of a browser level?
Re:I can see your local web servers by comex on Tuesday May 28, 2019 @07:15PM (#20035357)
It can’t. At best you can try to modify the hosts file to point localhost to somewhere bogus, but aside from the potential breakage that could cause, it won’t help against any site that simply accesses http://127.0.0.1 instead of http://localhost. In general, the hosts file can be useful for quick-and-dirty blocking, but it’s not really capable of enforcing a security barrier.

Edit: But there may be other ways to do it at an OS level, depending on your OS.