iamckn / wireguard_ansible

Ansible scripts for the set up a typical wireguard VPN connection
https://www.ckn.io/blog/2017/11/14/wireguard-vpn-typical-setup/
320 stars 69 forks source link

what about ipv6? #2

Open x0r2d2 opened 6 years ago

x0r2d2 commented 6 years ago

Hello,

What about ipv6 and how to provide clients with global ipv6 address if I have /64 ipv6 subnet on server?

Thanks.

iamckn commented 6 years ago

I was going to do an ipv6 guide but someone else already did a brilliant write up. Follow his guide here - https://danrl.com/blog/2016/travel-wifi/

x0r2d2 commented 6 years ago

@iamckn For me, your guide is better, clear and can be done by copy paste!

Could you add to your existing guide (typical wireguard setup) ipv6/64 global addresses to wireguard clients, please?

iamckn commented 5 years ago

Alright, I'll add it to my to do list. I'll try to have it done in the next few weeks.

listenlight commented 5 years ago

after i finished the tutorial, blindly, tho it's the kind of tutorial that the midrange semi-pros like me have to rely on (thank you!) -- i found my vps had eth0, eth1, eth2, and wg0. I've started from scratch and left off ipv6 just to get through all the steps again, and feel the awesome -- thanks again :+1:

listenlight commented 5 years ago

I'm looking at the recommended IPv6 tutorial, and it has not so much of your grace and patience. I hope you continue on this project. It's sure to help a lot of humans.

(ipv6 setup-- https://danrl.com/blog/2016/travel-wifi/)

mrdotb commented 5 years ago

I manage to make ipv6 work. Assuming you have already followed the tutorial.

Server side

ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ip6tables -A FORWARD -i wg0 -j ACCEPT

Forward ipv6 activate net.ipv6.conf.all.forwarding=1 in /etc/sysctl.conf

On the conf file

[Interfaces]
...
[Peer]
PublicKey = ...
AllowedIPs = 10.200.200.2/32, fd86:ea04:1115::5/64

Client side

conf file

[Interfaces]
Address = 10.200.200.2/32, fd86:ea04:1115::5/64
...
[Peer]
...
AllowedIPs = 0.0.0.0/0, ::/0