I have a Ubiquiti EdgeRouter X that works perfectly with both IPv4 and IPv6 from my ISP. Recently I’ve installed an OpenVPN client and I currently have IPv4 traffic going over the VPN.
I’m still wanting to support IPv6 but in a way that allows it to travel over the VPN. The VPN itself only supports connecting via IPv4 but does support IPv6 through the tunnel.
How can I configure the EdgeRouter X to do this?
For what it’s worth, here’s what I used to get IPv4 working:
set interfaces openvpn vtun0 config-file /config/auth/vpn-client.ovpn
set interfaces openvpn vtun0 description 'OpenVPN Client'
set service nat rule 5000 description 'OpenVPN Access'
set service nat rule 5000 log disable
set service nat rule 5000 outbound-interface vtun0
set service nat rule 5000 source address 192.168.143.0/24
set service nat rule 5000 type masquerade
set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface vtun0
set firewall modify openvpn_route rule 10 description 'OpenVPN'
set firewall modify openvpn_route rule 10 source address 192.168.143.0/24
set firewall modify openvpn_route rule 10 modify table 1
set interfaces switch switch0 firewall in modify openvpn_route
How?
I might be explaining this poorly, so here’s the documentation from the VPN provider. https://www.ivpn.net/knowledgebase/general/do-you-support-ipv6/
the question is which method for getting IPv6 addresses they support. Is it router advertisements / SLAAC or DHCPv6? You can configure your EdgeRouter accordingly.