Web lists-archives.com

Re: Accessing a host with variable IP addresses / connection types

On Wed, 17 Apr 2019 13:45:05 +1200
Richard Hector <richard@xxxxxxxxxxxxx> wrote:

> On 17/04/19 3:03 AM, Celejar wrote:


> > What I seem to want (but maybe XY?) is some way to adjust the host
> > files (or dnsmasq's information) so that the hostname will resolve to
> > the LAN address when the laptop is connected to the LAN, and the VPN
> > address when it's connected via VPN. If everything was using DHCP, this
> > would be straightforward enough, but as I said, the VPN apparently
> > needs to be configured statically, and not via DHCP. I could obviously
> > use some custom script (using, say, ageas, to modify host files) but
> > this seems hackish. What is a standard, 'correct' way to do this, or
> > more generally, to enable the LAN hosts to access the laptop
> > seamlessly regardless of its IP address and connection type?
> What about connecting to the VPN even from the LAN? So the VPN address
> is always available.

I suppose that's an option, but it just seems so terribly inefficient,
although I suppose that I likely wouldn't even notice during normal work.

> Another thought I've had in the past, but probably won't work in this
> case (because one of the locations is on the same side of the router as
> the other machines) is to give the laptop its own block (on the loopback
> or maybe a dummy device), and adjust the routing tables (which the
> wireguard server will probably do).