Disable road warrior peer automatically when using laptop at home
-
I'm still quite new to WireGuard but I have a tunnel setup for both my laptop and my iPhone. One feature, which I really like on my iPhone, is that it excludes my home SSID for automatically connecting. In other words, when I am OUTSIDE the house, my connection automatically connects to the WireGuard tunnel, no matter what cellular or WiFi connection I am connected to. When I get home, my iPhone automatically connects to my primary LAN via WiFi but since I've excluded my primary LAN's SSID, it disables that tunneled connection.
I would like to also do the same type of thing with my laptop. I would like it to have my laptop automatically start using the tunnel UNLESS I am connected to my home LAN via either WiFi or Ethernet. At the moment, it does automatically goes through the tunnel, even if I am plugged into a network jack on my home switch. I then have to go into the WireGuard program and disable the connection manually. I'm not finding anything explaining how this can be accomplished.