[Nottingham] Two Entries in /etc/hosts

Jason Irwin jasonirwin73 at gmail.com
Thu Apr 28 10:46:28 UTC 2016

Ah....the venerable VM SuperFlub. They work (kinda), but I'm not sure
how they deal with their WAN IP being used from the LAN side. Badly,
if your experience is anything to go by!
I use a Buffalo AirStation with the VM box in modem-mode. Works well
enough for my purposes but I'd not recommend one.
As to DD-WRT; I'd check OpenWRT compatibility before buying. I am
informed OpenWRT is superior an have every intention of trying it out.

Getting/Setting the hostname is done with "hostname". Setting needs
elevate privileges which your script may or may not depending on how
it gets run.

"netcfg current" tells you which profiles are running and that would
seem to be the way to find out if you're home or not.
The up/down stuff is bound to the actual interface rather than
profile. So I don't think that will detect a profile switch.

"/etc/hosts" really is for static stuff, this dynamic IP should
probably be set in dnsmasq, bind9 or whatever you use
("address=/blah/" etc) and that have it reload/restart.

What about running "wicd"? https://wiki.archlinux.org/index.php/wicd#Scripts
I guess other GUIs may have similar support.

Can't help but think there has to be a really easy way to run
something based on a profile switch. Seems like an obvious thing to
want to do.
Just can't find anything.

WARNING: DO NOT take network advice from this man.

More information about the Nottingham mailing list