summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-02-24 09:11:59 +0000
committerXiao Pan <xyz@flylightning.xyz>2025-02-24 09:11:59 +0000
commit2f0aed3bfbfb1ebd5a2df58f829ebbb983cc6eee (patch)
treec3c87658f6a8cc4d53397027648e47c0f226812a
parent0a729ac5155d3795666e26e2f6370bf88e61503e (diff)
IPv6AcceptRA=false to fix ipv6 not work sometimes
Sometimes, there's a new route appear in my `ip -6 r`: default nhid 715021918 via fe80::284:e5ff:fe28:829d dev eth0 proto ra metric 1024 expires 24sec pref medium There's also these lines appear in my `ip -a`: inet6 2606:a8c0:3:8cd:246:d3ff:fed8:155d/64 scope global dynamic mngtmpaddr noprefixroute valid_lft 86398sec preferred_lft 14398sec It seems sometimes Crunchbits maybe send some ipv6 RA (router advertisement) message to my VPS and cause my VPS to add these lines. This will break ipv6 of my VPS. I searched online, it seems I can use `IPv6AcceptRA=false` in my systemd network config file, and it fixed the issue. Not sure if this is the correct way. I also don't quite understand RA. Maybe another way to fix the issue is to accept RA and let is to configure my ipv6 correctly somehow. But this RA message only appears sometimes and not always. So I think just disable it maybe is a better way. More links related to RA: https://unix.stackexchange.com/q/766565 https://unix.stackexchange.com/q/639260
-rw-r--r--etc/systemd/network/10-cloud-init-eth0.network3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/systemd/network/10-cloud-init-eth0.network b/etc/systemd/network/10-cloud-init-eth0.network
index 31ea88f6..70765533 100644
--- a/etc/systemd/network/10-cloud-init-eth0.network
+++ b/etc/systemd/network/10-cloud-init-eth0.network
@@ -7,6 +7,9 @@
[Match]
Name=eth0
+[Network]
+IPv6AcceptRA=false
+
[Address]
Address=216.126.232.27/22