Quantcast
Channel: Active questions tagged openvpn - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 823

Route eth0 to tun0 (OpenVPN) and leave wlan0 unaffected

$
0
0

I currently have a Raspberry Pi Model B+ v1.2 (and I am planning to get the Raspberry Pi 4 after I sort out these issues). I have the network interface eth0 connected to my router through an Ethernet cable, and I have wlan0 connected to the same router through Wi-Fi.

I am planning on using this Raspberry Pi as a seedbox where I want all the traffic from qBittorrent-nox to go through the eth0 interface which will go through my OpenVPN, and then I want to leave the wlan0 interface unaffected by the VPN so I am able to access the qBittorrent-nox WebUI from my public no-ip address with my open port. (Note: My VPN doesn't allow for port forwarding)

I have seen a lot of posts talking about IP table routing but I didn't quite understand how to implement it for what I want.

I ran the "ip route show" command and below is the result:

0.0.0.0/1 via 10.28.10.5 dev tun0default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.26 metric 202default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.27 metric 30310.28.10.1 via 10.28.10.5 dev tun010.28.10.5 dev tun0 proto kernel scope link src 10.28.10.6103.231.91.74 via 192.168.1.1 dev eth0128.0.0.0/1 via 10.28.10.5 dev tun0192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.26 metric 202192.168.1.0/24 dev wlan0 proto dhcp scope link src 192.168.1.27 metric 303

Below is my "ifconfig" command result:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.1.26  netmask 255.255.255.0  broadcast 192.168.1.255        inet6 fe80::f96:bfff:cd6d:d1d6  prefixlen 64  scopeid 0x20<link>        inet6 2404:4408:23f4:5500:c127:7182:abfb:5e26  prefixlen 64  scopeid 0x0<global>        ether b8:27:eb:61:19:70  txqueuelen 1000  (Ethernet)        RX packets 911757  bytes 1126311222 (1.0 GiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 449193  bytes 64017695 (61.0 MiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536        inet 127.0.0.1  netmask 255.0.0.0        inet6 ::1  prefixlen 128  scopeid 0x10<host>        loop  txqueuelen 1000  (Local Loopback)        RX packets 123  bytes 12608 (12.3 KiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 123  bytes 12608 (12.3 KiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500        inet 10.28.10.6  netmask 255.255.255.255  destination 10.28.10.5        inet6 fe80::c6ba:27ae:2226:dfa2  prefixlen 64  scopeid 0x20<link>        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)        RX packets 467058  bytes 552751583 (527.1 MiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 253762  bytes 16534884 (15.7 MiB)        TX errors 0  dropped 102112 overruns 0  carrier 0  collisions 0wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.1.27  netmask 255.255.255.0  broadcast 192.168.1.255        inet6 fe80::65b8:5d35:c9e6:b85f  prefixlen 64  scopeid 0x20<link>        inet6 2404:4408:23f4:5500:cfd3:d82:7d0b:93ce  prefixlen 64  scopeid 0x0<global>        ether 00:c0:ca:84:7d:51  txqueuelen 1000  (Ethernet)        RX packets 22208  bytes 23412831 (22.3 MiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 364  bytes 43145 (42.1 KiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Any help is appreciated. Thanks in advance!


Viewing all articles
Browse latest Browse all 823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>