After some time of intensive Googling and a lot of attempts, I've decided to ask a question here.
I have 2 outgoing interfaces with the below configuration:
Code: Select all
auto enp0s3
iface enp0s3 inet dhcp
metric 100
auto enp0s8
iface enp0s8 inet dhcp
metric 200
Code: Select all
default via 192.168.1.1 dev enp0s3 metric 100
default via 192.168.42.129 dev enp0s8 metric 200
So I'd like to have first OpenVPN's instance (client_01) connected using
Code: Select all
default via 192.168.1.1 dev enp0s3 metric 100
Code: Select all
default via 192.168.42.129 dev enp0s8 metric 200
With curl, ping, traceroute everything works as expected:
Code: Select all
# curl --interface enp0s8 'http://api.ipify.org?format=json'
{"ip":"PUBLIC_IP_1"}
# curl --interface enp0s3 'http://api.ipify.org?format=json'
{"ip":"PUBLIC_IP_2"}
client
proto tcp
remote REMOTE_IP
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret static.key
Server configuration is basically the same (missing remote and swapped ifconfig values).
Could you please tell me how I can achieve configuration like that?
Thanks!