I added an OpenVPN profile to Ubuntu (19.10) Network Manager via GUI. Connecting to and using internet through this VPN works fine (via IP or domain name, IP is 10.137.10.60), but I can't access local network devices of course. In my case, I am trying to mount an SMB share. How can I accomplish allowing connections to this SMB share to get out of the machine while the VPN is enabled? I have not done any other config other than setting up the VPN profile. All settings in network manager under the VPN profile are still set to whatever the defaults are.
netstat -nr while connected to VPN
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.15.0.1 0.0.0.0 UG 0 0 0 tun0
0.0.0.0 10.137.85.1 0.0.0.0 UG 0 0 0 ens160
10.15.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tun0
10.137.85.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
10.137.85.1 0.0.0.0 255.255.255.255 UH 0 0 0 ens160
108.182.226.219 10.137.85.1 255.255.255.255 UGH 0 0 0 ens160
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ens160netstat -nr while DISCONNECTED from VPN
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.137.85.1 0.0.0.0 UG 0 0 0 ens160
10.137.85.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ens160 5 1 Answer
It really depends on what you are trying to achieve. For example, if you are only trying to use certain resources through the VPN you can try cheacking this box
If you are trying to tunnel all traffic and you don't control the other end point, you should still be able to access local resources via their IP (assuming that the VPN you are connecting to does not use the same IP range).
For example, I have OpenVPN setup on my PFSense. It shunts VPN Users to a 10.x.x.x network, while most home networks start with 192 or 172. This means that there is no confusion about which machine I am trying to access if I ping 192.168.1.111.
Hopefully this helps clear things up. As for your specific samba question you can hit
ctrl + l while in Nautilus (Files app) to bring up the bar. You can then type smb:// and connect that way