Routing all IPv6 traffic with a global address

Hello!

My home network has both IPv4 and globally routable IPv6 connectivity. But I have another laptop at an external location with only IPv4 connectivity. I would like to assign an IPv6 address from my home network range to the laptop and route all IPv6 traffic through a server at my home.

Assuming,
Zerotier interface: ztXXX
Homeserver ISP Global IP: 2405:XXX:9a69/64
Homeserver Zerotier Network IP: fdd3:XXX:c541/88

Laptop Desired Global IP: 2405:XXX:f03
Laptop Zerotier Network IP: fdd3:XXX:18d3/88

I enabled IPv6 forwarding and ndppd on the home server and added appropriate iptables rules. I was able to achieve this by manually configuring the laptop like this:

Adding the IP: ip addr add 2405:XXX:f03 dev ztXXX
Which results in:

inet6 2405:XXX:f03/128 scope global 
       valid_lft forever preferred_lft forever

Adding the default route via home server: ip route add default via fdd3:XXX:c541
which results in:

default via fdd3:XXX:c541 dev ztXXX metric 1024 pref medium

This works as intended! :smiley:

Now I want to automate this. So I added to the network’s local.conf file

allowManaged=1
allowGlobal=1
allowDefault=1
allowDNS=1

and restarted zerotier-one.service.
Through the Zerotier web interface I added 2405:XXX:f03 to the laptop’s IP list. This does NOT change anything in the laptop’s ztXXX interface!

Now again through the Zerotier web interface I added a default route ::/0 via fdd3:XXX:c541. This finally adds both an address and route to the laptop’s ztXXX interface.

inet6 2405:XXX:f03/0 scope global
       valid_lft forever preferred_lft forever
default dev ztXXX proto kernel metric 256 pref medium

This does NOT work! :frowning:

I am a networking beginner but to me it seems like the assignment by Zerotier is wrong. The address should be /128 and the default route should be via the home server. How can I resolve this?

Did you check this?

That’s what I already have selected and I get the fdd3:... address just fine from that. But I also want to assign an additional global IPv6 address and the default route via another device in the zerotier network.