I have three machines hooked together: A desktop, a laptop, and small public server. The desktop and laptop are usually on NAT-ed networks, while the server has a static IP with publicly accessible ports. By only specifying the server (
10.0.14.0/24) on both machines, they are able to connect to ping each other (
10.0.14.101/32, respectively) through it. However, I want the laptop and desktop to connect directly over LAN on the occasion they are both on the same LAN, for obvious performance reasons.
I have already tried putting down an additional
Peer entry on the laptop and desktop informing them about the other using their fixed private IPs when on the LAN. This prevents the general
10.0.14.0/24 rule from ever taking effect, though.
How can I get the laptop and desktop to connect using a direct connection specified via
Endpoint when accessible, but fallback to a more general server otherwise?