I'm not knowledgeable with IPtables or networking really. I only know enough to get it up and running. I'm working on Ubuntu Server 18.04 running headless that I access via SSH.
On the server, I would like to use both a VPN connection and a normal non-VPN connection for different services. The reasons are my media server isn't accessible behind the VPN and the VPN connection is considerably slower than my normal connection. So I would like to use both the ethernet connection (eno1 on my system) and the openvpn (tun0) connection, restricting the tun0 connection to specific services.
Here's where I'm at:
eno1 is set to a static IP using netplan:
With the VPN off, the route looks like:
With openvpn up and connected through my VPN (PIA if it matters), the route looks like:
and the connection works as expected - I can "see" the internet though tun0 and have a different IP than the one provided by my ISP. But this seems to disable my ability to use eno1, i.e. I can ping google from tun0 but not eno1.
So either my openvpn connection is configured incorrectly, or I need some sort of other netplan or iptable routing - or all of the above. Suggestions?
On the server, I would like to use both a VPN connection and a normal non-VPN connection for different services. The reasons are my media server isn't accessible behind the VPN and the VPN connection is considerably slower than my normal connection. So I would like to use both the ethernet connection (eno1 on my system) and the openvpn (tun0) connection, restricting the tun0 connection to specific services.
Here's where I'm at:
eno1 is set to a static IP using netplan:
Code:
[FONT=monospace][COLOR=#000000]# This file describes the network interfaces available on your system[/COLOR] # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: eno1: dhcp4: no dhcp6: no addresses: [192.168.1.250/23] gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8,8.8.4.4][/FONT]
Code:
[FONT=monospace][COLOR=#000000]Kernel IP routing table[/COLOR] Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eno1 192.168.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eno1[/FONT]
Code:
[FONT=monospace][COLOR=#000000]Kernel IP routing table[/COLOR] Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.59.10.5 128.0.0.0 UG 0 0 0 tun0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eno1 10.59.10.1 10.59.10.5 255.255.255.255 UGH 0 0 0 tun0 10.59.10.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 107.191.33.6 192.168.1.1 255.255.255.255 UGH 0 0 0 eno1 128.0.0.0 10.59.10.5 128.0.0.0 UG 0 0 0 tun0 192.168.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eno1[/FONT]
So either my openvpn connection is configured incorrectly, or I need some sort of other netplan or iptable routing - or all of the above. Suggestions?
Comment