Page 1 of 1
IPv6 VPN with custom private IP in linux
Posted: Wed May 05, 2021 9:18 am
by biscuit
I need to assign private IPv6 address to the network interface. I can do that in windows in
Network Connections > VPN Client > Properties > Internet Protocol Version 6 (TCP/IPv6) and set the IPv6, Subnet prefix length and gateway manually.
Please, is there the way how to do it in linux (Ubuntu 20)?
Thanks
Re: IPv6 VPN with custom private IP in linux
Posted: Wed May 05, 2021 10:28 pm
by MGruberTunnels
Hi! I think there are two ways you could check out.
First is through the Terminal (as always be very careful with these changes). You can edit
and add the following to the file:
Code: Select all
iface [YOUR INTERFACE NAME] inet6 static
address [YOUR IPV6 ADDRESS]
netmask 64
dns-nameservers [YOUR DNS SERVER]
post-up sleep 5; /sbin/ip -family inet6 route add [YOUR GATEWAY] [YOUR INTERFACE NAME]
post-up sleep 5; /sbin/ip -family inet6 route add default via [YOUR GATEWAY]
pre-down /sbin/ip -family inet6 route del default via [YOUR GATEWAY]
pre-down /sbin/ip -family inet6 route del [YOUR GATEWAY] [YOUR INTERFACE NAME]
You can bring the interface up with
Code: Select all
ip link set [YOUR INTERFACE NAME] up
Then you can restart it with
To check if the IPV6 address works, you can do a ping6 command on the terminal.
The second is by installing OpenVPN and letting that handle the IPV6 setup for you. This is my first post so I'm not sure if I can post links, but there are a few tutorials in the web for that :D