I already successfully have a VPN server up and it does work. My VPN server is on my home network with an IP address of 192.168.1.1/24 and a subnet mask of 255.255.255.0
When I am on my laptop and I am on a network with a different subnet, say 192.168.0.1/24 everything works jsut fine.
My problem is that when I am on a network with the same subnet (192.168.1.1/24) and I connect to my VPN and I try to go to a local address on the VPN side, I only get connected to the address on the network that I am physically on. How do I fix this?
Sorry if this doesn't make sense. Feel free to ask questions if you don't understand my situation.
Essentially your computer can't tell the difference between 192.168.1.0/24 that is on the local network and 192.168.1.0/24 on the VPN.
The problem with putting all of your traffic through the VPN is that you have to have a gateway on the local network but it is very easy to set your network connections so it thinks the internet gateway is on the other side of the VPN. If that happens then it won't be able to send any traffic anywhere because it can't route anything to the Internet.
The simplest solution to all of this is to change the address range on the VPN. In fact I've considered using IPv6 on my VPN network to be sure that it never conflicts with an IPv4 network. (not done it yet though)
Do you want everything to go though the VPN or just some traffic. Some applications allow you to specify an interface to use, check the man pages for what you are using.
Finally, if we can fix this, have you thought what you would like to happen if you want to access a local service?
Let us know how you get on,
So, is it almost impossible to make shure that on every possible other netowrk the VPN works then? Would I have to use obscure ip addresses on my home network, say 192.168.234.0/24 to make the VPN work on other netowrks?
I'm afraid so. There are definitely steps you can take to mitigate the problem when it crops up like specifying network interfaces to use or simply assuming the home network takes priority over the local network when a conflict arises but that's about all. (at least that I know of, there may be other options that I'm unaware of).