Code: Select all
eth0 - 192.168.1.155/24
eth1 - 192.168.2.155/24
Code: Select all
default via 192.168.1.1 dev eth0 onlink
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.155
192.168.2.0/24 dev eth1 proto kernel scope link src 192.168.2.155
Code: Select all
0: from all lookup local
32764: from all to 192.168.2.155 lookup vpn
32765: from 192.168.2.155 lookup vpn
32766: from all lookup main
32767: from all lookup default
and using this .opvn file i am able to establish a VPN session. I noticed that the traffic of all interfaces, eth0 and eth1, now goes through the VPN tunnel. This is not what I want. I would like to bind the VPN session to a specific interface so that I can decide which application must use the VPN session and which not. The effect would be (with a active VPN session):
Code: Select all
eth0 -> home ISP IP
eth1 -> VPN Server IP
Code: Select all
local 192.168.2.155
Code: Select all
...
Mon Aug 4 09:57:33 2020 /sbin/ip route add 185.153.176.222/32 via 192.168.1.1
...
Question #2: How do I configure the openvpn client that a VPN session is only avaible through interface eth1.
Any advise is appreciated.