Community discussions

MikroTik App
 
dazzaling69
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Wed Feb 22, 2017 12:01 pm

Wireguard IPv6 and Subnets

Wed Apr 17, 2024 12:56 pm

I want to extend my Wireguard access to IPv6 (it's working with IPv4). The first instruction in guides is usually to set aside an IPv6 subnet for Wireguard to use. Being new to IPv6 (it's a bit of a mind-shift from IPv4 in some ways) I'm not sure how to do that.

Can anyone help?

Is there a simple guide with steps that covers Wireguard IPv6 setup anywhere?
 
kalamaja
Member Candidate
Member Candidate
Posts: 114
Joined: Wed May 23, 2018 3:13 pm

Re: Wireguard IPv6 and Subnets

Wed Apr 17, 2024 1:41 pm

Mikrotik only shares prefixes, so it won't share IPv6 addresses over Wireguard, so if you connect router to the Wireguard that will share addresses to clients, then it works.

Easiest way is to enable IPv6 for Wireguard client devices is to enable Back To Home feature, but it masquerades client IPv6 traffic behind router's address.
 
biomesh
Long time Member
Long time Member
Posts: 566
Joined: Fri Feb 10, 2012 8:25 pm

Re: Wireguard IPv6 and Subnets

Wed Apr 17, 2024 2:08 pm

It won't be automatic address assignment, but this can be done.

Add an address to the wireguard interface on the router i.e fd00:12::1/64

Add and address to the wireguard client (remote device) and on the peer (allowed addresses) i e fd00:12::2/128

If you have your ipv6 routes configured correctly on the router that is about it. This assumes you already have ipv6 configured correctly elsewhere on your router/network already.
 
User avatar
EricMann
just joined
Posts: 1
Joined: Mon Jan 22, 2024 1:06 pm
Location: Jersey City USA
Contact:

Re: Wireguard IPv6 and Subnets

Wed Apr 17, 2024 2:22 pm

Your IPv6 address consists of 128 bits? divided into eight groups of four hexadecimal digits separated by colons. Fix one suitable IPv6 subnet range for your Wireguard setup. This range should be distinct from other IPv6 networks you may have configured. For example, 2001:0db8:85a3::/64. Once you've taken a subnet, start allocating each IPv6 addresses within that subnet for your Wireguard peers. Each peer will need its own unique IPv6 address from this subnet. Start Updating your Wireguard configuration file to include the allocated IPv6 addresses for each peer. Ensure that IPv6 traffic is permitted through any relevant network devices or firewalls. After making these changes, test your Wireguard setup to ensure that IPv6 connectivity is working as expected. Use the tool ping6 to verify your connectivity.
 
dazzaling69
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Wed Feb 22, 2017 12:01 pm

Re: Wireguard IPv6 and Subnets

Fri Apr 19, 2024 1:21 am

Hi Eric,

This is exactly what I assumed I would need to do. I don't, however, know how to do these steps.

Fix one suitable IPv6 subnet range for your Wireguard setup - how?
Once you've taken a subnet, start allocating each IPv6 addresses within that subnet for your Wireguard peers - how?
Start Updating your Wireguard configuration file to include the allocated IPv6 addresses for each peer. - how?

Thanks in advance.

D
 
dazzaling69
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Wed Feb 22, 2017 12:01 pm

Re: Wireguard IPv6 and Subnets

Thu May 02, 2024 4:49 pm

Are there any helpful suggestions for this? I think if I knew how to arrange subnets/fix IP addresses, etc., I could figure out the rest myself.

Who is online

Users browsing this forum: codebreaker, jaclaz, okw and 27 guests