1

I setup my pi using this guide (NAT version): Setting up a Raspberry Pi as an access point - the easy way

For IPv4 this worked like a charm. The problem is, that I cannot get IPv6 to work as well. My Pi itself has a static IPv6 address assigned inside /etc/systemd/network/04-eth0.network and is able to access the internet via IPv4 as well as IPv6.

I tried using IPv6PrefixDelegation and assigning IPv6 addresses inside 12-eth1.network, but this didn't change anything. I thus tried using radvd which actually assigned IPv6 addresses to my other devices, but they still can't access the IPv6 world (can't ping google, can't even ping my Pi).

Reading some more, I found out that IPMasquerade=yes sets IPForward=IPv4, so I tried it without, but that only made my IPv4 stop working (as expected), but didn't change anything for IPv6. Also, even with IPMasquerade on, /proc/net/ipv6/conf/all/forwarding still says 1.

I would prefer to be able to use NAT for IPv4 as it makes using pihole easier (automatic dns etc), but I need my devices to be able to connect to the global static IPv6 address of my pi. Anyone has any idea if this is possible and if so, what I need to do?

Here are my config files as they are right now (again I tried many things): 04-eth.network (net to outside world):

    [Match]
    Name=eth0
    [Network]
    Address=2001:***:****:**:****:****:****:****/64
    Gateway=2001:***:****:**::1
    DHCP=ipv4
    IPForward=yes

12-eth1.network:

    [Match]
    Name=eth1
    [Network]
    Address=192.168.3.1/24
    Address=2001:***:****:**:****:****:****:****/64
    MulticastDNS=yes
    IPMasquerade=yes
    DHCPServer=yes
    IPv6PrefixDelegation=dhcpv6
    [DHCPServer]
    192.168.3.1

08-wlan0.network: Same as above, except 192.168.4.1 for Address/DHCPServer

radvd.conf (not in use right now, was before I tried IPv6PrefixDelegation:

interface eth1{
    AdvSendAdvert on;
    RDNSS IPv6 of Pi {};
    prefix 2001:***:****:**::/64
    {
        AdvOnLink on;
        AdvAutonomous on;
    };
};
Same again for interface wlan0

Any ideas are appreciated

Edit:// See https://unix.stackexchange.com/questions/566508/correct-routing-of-ipv6

I think I found out that it is most likely not because of IPMasquerade (systemd networkd code shows that it actually only enables IPv4-forwarding, not disables IPv6) but because of subnets and routing. So I thought it would be good to ask somewhere more generic.

1

As I suspected, the problem was not because of nat or subnetting but because of wrong ip routes. I explained the solution here: https://unix.stackexchange.com/questions/566508/correct-routing-of-ipv6

Short answer: Make sure all your devices are routing the traffic for the global ipv6 addresses to their respective local ones.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.