On Mar 23 14:10:58, [email protected] wrote: > I have a laptop in which I use ifstated to determine whether it is "at > home" or whether it is "roaming", and bring up the VPN -- used to be > iked, now its wg -- for unwind and some NFS shares, if it is. > > My question is: how would you detect if the machine it's "at home"?
You know if you are at home. So start up the VPN by hand if you are roaming. > My present setup is a combination of checking the BSSID of the AP if it > is connected to one, and some MAC addresses of other machines on the > network. I can think of a couple other ways (SSH host keys, external IP > -- though it might change --, DHCP-assigned domain, etc). Is there an > easier way I'm not thinking of? How would you do it? > > Note that this doesn't have 100% fail proof nor am I worried about > covering absolutely all corner cases, or paranoid about someone spoofing > my network's BSSID, MAC addresses, etc, etc, just to prevent me from > setting up a VPN. This is just for convenience. > > Cheers and TIA > Zé > > -- > > >

