Score:0

OpenVPN drops the connection to my machine from outside LAN

pf flag

I'm facing this specific issue that I can't reproduce on Windows and Mac, it happens only on Linux.

My network has the following setup. Fiber Router DHCPs 192.168.1.x to WiFi Router 192.168.0.x DHCP's to devices.

I have an OpenVPN server on my WiFi Router through which I'm connecting to my machines from outside LAN. The problem happens when one of my Linux machines establishes a connection to some other OpenVPN server. As soon as the OpenVPN gets connected on Linux, I'm no longer able to ping that very Linux machine from outside my LAN, however, it still works within the LAN. Also as I mentioned above this happens only on Linux machines, I have tested on Ubuntu 18 and Fedora 34.

I thought it can be from IP forwarding, so tried to enable it on Linux, but it didn't help.

Any other ideas?

AlexOnLinux avatar
ng flag
your explanation is really hard to understand. can you please elaborate your question. Perhaps you should call them client abc and ovpn server abc. what connection does work, which does not and when? certain settings in your client config and in the server config can cause this. Windows interprets the config different than Linux at certain commands. Not all commands work on every OS.
pf flag
Okay think of it this way. I'm on the street with my phone, have a laptop(ubuntu) at home and workstation box at the office. When my laptop is connected to my work's network through openvpn, I'm no longer able to access the laptop from my phone which itself uses openvpn as well to connect to my home network.
AlexOnLinux avatar
ng flag
can you post the client & server config file from your laptop and workstation? also `ip route` from your laptop prior and after the vpn connection might be helpful. I do not expect it to be a forwarding issue. I guess you have a routing issue. Perhaps the vpn-config says that you should ignore any outside vpn laptop2workstation connection. I am no way an openvpn expert. I prefer wireguard. But anyway, compare your config file entries with the openvpn manual. I am pretty sure the solution is in the configuration. If you want to check forwarding check the forwarding chain in `iptables -S`
pf flag
I can share the client config with which ubuntu gets connected to the work network. https://pastebin.com/DeA0mC0Q
AlexOnLinux avatar
ng flag
i do not see anything that might be in conflict in that client config file. did you check what address range you are using with your laptop or phone when connected to the vpn? is the a conflict? might it be possible that all your traffic is routed to the workstation network? does your ip change before / after you connect to your vpn?
pf flag
It doesn't route all the traffic thorough VPN, as my IP stays the same. I've tried pretty much all possible options, and then the fact that it works on Mac and Windows out of the box, makes me think that is not actually from OpenVPN, but rather Linux specific issue. That being said you mentioned certain commands in the OpenVPN config are OS specific can you point out the differences which might be connected with the issue?
AlexOnLinux avatar
ng flag
no, i cannot because i am no expert in openvpn. look up the manual and search for keywords like windows or linux https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.