I have a Server on my house to proves and when I'm on my laptop in my house I have to write the local IP to see the web server, and i want to know if it is possible write a script to automatically detect the network and add the line on hosts file, and when is in other network delete this line.
Thanks.