If you don't have IPv6 at home, sometimes you want to be able to test IPv6 only services- you need to tunnel a IPv6 connection somehow from your IPv4 internet connection to a server which does have IPv6 enabled.
You can achieve that by using a combination of:
A cheap VPS server with IPv6 connectivity
Wireguard
Some iptables rules (in the Wireguard settings)
This example assumes an Ubuntu based system.
Easy to forget most examples you'll find online don't include the /sysctl conf changes needed, which are:
Example server config:
Example client config:
Note the above hints at using Cloudflare for DNS should you wish.
How to start/stop wireguard
On both your server and client:
Start:
systemctl start wg-quick@wg0.service
Stop:
systemctl stop wg-quick@wg0.service
How do I ssh to an IPv6 server?
In the same way!
You might need to enable opensshd to listen on ipv6 though:
Then reload sshd: systemctl restart sshd
Then to ssh into your server over ipv6 you can do ssh -6 root@<your-ipv6-address>