Does anybody knows if there is an utility that enable/disable the "hosts' file"
Asked
Active
Viewed 315 times
0
-
3on which os? linux? windows? server? client? why? – Mar 01 '11 at 16:19
-
2Bad idea as many software depends on localhost which is defined in the hosts file. – Mar 01 '11 at 16:29
-
Anyone with access to write to the hosts file will have access to undo this. – James L Mar 01 '11 at 16:57
2 Answers
4
In UNIX you can use nsswitch. Default:
hosts: files dns
If delete files:
hosts: dns
/etc/hosts will not work

ooshro
- 11,134
- 1
- 32
- 31
1
What OS? In windows you can rename the file using a basic batch command, or your scripting language of choice. I've also noticed that Windows will cache DNS resolution, so you'll also need to run "ipconfig /flushdns" afterwards.

DrZaiusApeLord
- 1,174
- 2
- 9
- 18