[Nottingham] Two Entries in /etc/hosts

Jason Irwin jasonirwin73 at gmail.com
Wed Apr 27 10:53:20 UTC 2016

I use my domain name and let the router worry about it, I am blessed
with a fairly static IP (although there are ways to dial with more
dynamic ones).
Can you fiddle with the router so it recognises WAN as "self"?
I just checked my ping times for local/remote IPs and didn't see much change.
Due to a bug in DD-WRT, I have had to do IP Tables shenanigans so make
things work; so that might mean I don't see the same problem.

If not, I guess you could have a wee systemd or /etc/network/if-up.d
thing to check if your IP is 192.168.x.y (or whatever other feature of
home LAN is unique), then inject the local IP or remote IP. Seems like
a kludge so me though.

I am sure someone who actually understands networking wizardry will be
along shortly...


On 27 April 2016 at 10:05, Richard Parsons <rp at redwoodlegal.co.uk> wrote:
> Hello folks
> 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?
> 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.
> It seems to me to be such a common problem, that there must be solutions out
> there just waiting to be used.
> If it makes a difference I'm using Arch with netctl to manage my network
> connections.
> Many thanks
> Richard
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham

More information about the Nottingham mailing list