0

Is it possible to configure OPENVPN on existing tun interface using .ovpn config file?

I have interface tun1 sudo ip tuntap add mode tun dev tun1 and config file ./vpn.ovpn and i need to configure vpn on this device without changing routing for another interfaces, is it possible?

1 Answers1

0

Yes you can use an existing interface:

# dev-type should only be used if dev does not start with tap or tun
# dev-type tun
# dev use tun or tap, or existing interface
dev tun1
# ifconfig is not needed, but you need to take care of peer etc config in your own interface up logic

Minor differences can exist between versions of OpenVPN https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/

NiKiZe
  • 1,246
  • 8
  • 20