[Nottingham] Two Entries in /etc/hosts
rp at redwoodlegal.co.uk
Thu Apr 28 07:32:01 UTC 2016
Thanks Jason. Sorry to sound so dumb, but I can't find anywhere on my
router (boring home Virgin media blah) to set a domain name. Maybe I should
man up and buy myself something on which I can use DD-WRT too...
I'm using Arch and it looks like the equivilent of if-up.d is to set a
configuration variable in the relevant netcfg profile:
https://www.archlinux.org/netcfg/features.html. There's a section called
"Execute commands before/after interface up/down" which explains how to do
That begs the question of how to set a hostname at the commandline? I'd
need to be able to run a command to "add" an entry to my /etc/hosts.
On Wed, Apr 27, 2016 at 11:53 AM, Jason Irwin <jasonirwin73 at gmail.com>
> 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
> 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
> > around the internet. I would like the same hostname to point to a local
> > 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
> > it was taking much longer because I was actually using my public IP
> > rather than the local one. It seems to make a significant difference to
> > time etc. In fact, pinging myself through the public IP address seems to
> > 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
> > 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
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
rp at redwoodlegal.co.uk
Office: 02030 956010
138-140 Southwark Street, London, SE1 0SW
This firm is authorised and regulated by the Solicitors Regulation
Authority (SRA ID 427552)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nottingham