0

My current working setup is as follows:

Linux machine with 2 NICs (eth0 and wlan0) sitting behind a wireless router. Let's call this machine PC1.

  • connected to eth0 on PC1 is PC2 (Windows).

  • wireless router is 192.168.0.1 and wlan0 is 192.168.0.xxx.

  • eth0 is 10.42.0.1 and PC2 is at 10.42.0.xxx.

I have successfully used this setup to establish an OpenVPN connection (by right-clicking on a config file) from PC2 to an external server. That is, the connection goes through eth0 to the wireless router. Starting VPN creates on PC2 a virtual network adapter at 10.7.112.xxx with a gateway at 10.7.112.1.

So far, so good.

Problems started after I added eth1 to PC1. Its IP address is 192.168.1.1. Connected to it is PC3 at 192.168.1.xxx.

What kind of problems?

I can access PC2 from PC3 and the other way around unless I establish a VPN connection from PC2. After I do, PC2 and PC3 cannot see each other anymore unless I disconnect VPN, getting rid of the 10.7.112.xxx virtual adapter. Then, connectivity restores immediately.

I made sure, there's no active firewall rules.

The subnet masks on all of the above are 255.255.255.0. Does that matter?

What do I have to change to make the 3-NIC setup work as well as the 2-NIC one? Please do not suggest changing the layout - I need to understand what exactly is wrong with the current routing.

Thank you!

4
  • What VPN software are you using? What does PC2's routing table contain before and after establishing the VPN connection? Jan 21, 2019 at 8:08
  • No other software but the OpenVPN client. I use a config file from my VPN provider to connect and then just Ctrl+C to disconnect. I have the routing table pre and post - VPN. Which entries should I provide?
    – vanhemt
    Jan 21, 2019 at 12:55
  • @grawity: by 'OpenVPN client', I mean the Private Tunnel downloaded from openvpn.net. Works in terminal mode.
    – vanhemt
    Jan 21, 2019 at 12:58
  • @grawity: Okay, I can see that Default Gateway changes after starting VPN from 10.42.0.1 to 10.7.112.1 - could that be a problem?
    – vanhemt
    Jan 21, 2019 at 13:04

0

You must log in to answer this question.

Browse other questions tagged .