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
IPv6 VPN with custom private IP in linux
-
- Posts: 11
- Joined: Mon Apr 26, 2021 2:56 pm
Re: IPv6 VPN with custom private IP in linux
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:
You can bring the interface up with
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
First is through the Terminal (as always be very careful with these changes). You can edit
Code: Select all
/etc/network/interfaces
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]
Code: Select all
ip link set [YOUR INTERFACE NAME] up
Code: Select all
sudo systemctl restart networking
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