Connect to router of same IP as in home network via VPN

Hi!

I attempt the following: I am in a network, and have my router A on 192.168.178.1. I connect to another network via WG, where Router B is also on 192.168.178.1. But when I enter that IP into my browser, I get the interface of Router A. What is happening here? Shouldn’t the VPN tunnel all my traffic, so I actually shouldn’t even have access to my home network like that?

The OS btw is MacOS 14 ^-^

No you should get router A because that is the devices gateway so if you alter the metric to go somewhere else then no packets will reach the other location as you have no route out.

There are 97919 other subnets you can use.

Change the subnet on one of the networks.

Even if you’re VPNing, your computer has to keep tabs on the hosts/router on your local network. Having access to the local router is a requirement to be able to connect to the internet, so no VPN solution will send over VPN any local traffic.

If you need to access router B, you have to make sure they don’t share the same IP address, or use DNAT, which is a tool for network administrators for such cases like yours.

ah, so first hop is always router A, then VPN, then the other subnet or out of there again?

How does VPN encryption work then? I thought I tunnel into another network with that?

yes, this would work in my case :slight_smile: I was just wondering, why this was happening

Communication is encrypted only if it traverses the vpn. As it is not doing that in your example the vpn is not used.

It happens since your VPN allows access to the local network, and because the most specific route is selected (i.e. the route with the longest matching prefix). In your case the local route is selected.

Because routing is always processed in a particular order, and directly connected networks pretty much always happen first. If one of the interfaces on your system is directly connected to a 192.168.178.0/24 network, then that is what is used. Look at your routing tables of all the devices involved, they will tell what will happen, once you learn how the computer interprets them.