Hello!
I use two of the outer 100 megabits / sec connections, WAN1 and WAN2, connected to ISP1 and ISP2 respectively. I also use several OpenVPN tunnels, tun1 and tun2 interfaces.
This is the current configuration of OpenVPN tunnels for IPv4 and IPv6:
config interface 'vpn1_v4'
option proto 'none'
option ifname 'tun1'
option delegate '0'
option defaultroute '0'
config interface 'vpn1_v6'
option proto 'none'
option ifname 'tun1'
option delegate '0'
option defaultroute '0'
config interface 'vpn2_v4'
option proto 'none'
option ifname 'tun2'
option delegate '0'
option defaultroute '0'
config interface 'vpn2_v6'
option proto 'none'
option ifname 'tun2'
option delegate '0'
option defaultroute '0'
WAN Configuration:
config interface 'wan1'
option proto 'dhcp'
option peerdns '0'
option ifname 'eth0.2'
list dns 'ххх.ххх.ххх.ххх'
option delegate '0'
config interface 'wan2'
option proto 'dhcp'
option peerdns '0'
option ifname 'eth0.3'
list dns 'ххх.ххх.ххх.ххх'
option delegate '0'
Tell me, please, how do I correctly bind the unmanaged tunnels tun1 and tun2 each to my WAN interface. That is, tun1 to WAN1, and tun2 to WAN2?
The documentation https://openwrt.org/docs/guide-user/network/tunneling_interface_protocols has the tunlink option but it is not described for proto 'none'. Is it possible to apply the tunlink option to proto 'none', will this work correctly?
That is, like this, as in the example below, will it be correct?
config interface 'vpn1_v4'
option proto 'none'
option ifname 'tun1'
option delegate '0'
option defaultroute '0'
option tunlink 'wan1'
config interface 'vpn1_v6'
option proto 'none'
option ifname 'tun1'
option delegate '0'
option defaultroute '0'
option tunlink 'wan1'
config interface 'vpn2_v4'
option proto 'none'
option ifname 'tun2'
option delegate '0'
option defaultroute '0'
option tunlink 'wan2'
config interface 'vpn2_v6'
option proto 'none'
option ifname 'tun2'
option delegate '0'
option defaultroute '0'
option tunlink 'wan2'