<div dir="ltr"><div><div><div><div><div>Hello folks<br><br></div>I use my /etc/hosts file in order to point certain hostnames at IP addresses around the internet. I would like the same hostname to point to a local IP address when I'm on my home network, and a public IP address when on any other network. How can I set this up?<br><br></div><div>I recently discovered that when I was copying things over my local network it was taking much longer because I was actually using my public IP address rather than the local one. It seems to make a significant difference to ping time etc. In fact, pinging myself through the public IP address seems to be massively less reliable and speedy than using a local IP (maybe that shouldn't be a surprise). I'm using mtr to test that.<br></div><div><br></div>It seems to me to be such a common problem, that there must be solutions out there just waiting to be used.<br><br></div>If it makes a difference I'm using Arch with netctl to manage my network connections.<br><br></div><div>Many thanks<br></div></div>Richard<br><br></div>