How do I get Linode to recognise an IPv6 address for Ubuntu 20.04?

It seems that recently (sometime over the past few months, I think), my old Ubuntu Server 20.04 instance has been allocated an IPv6 address and is now attempting to route all outbound traffic via IPv6 without success. The Linode configuration manager still only lists the IPv4 address.

ifconfig lists both a global and local link IPv6 address. If I disable IPv6 everything works fine, but I'd like to get IPv6 running on this node.

I'm not even sure whether this is an Ubuntu or a Linode configuration issue. I've enabled the network helper and rebooted a few times without success.

Any pointers in the right direction would be appreciated.

5 Replies

You also have to allow:

  • IPv6 Router Discovery (Router Advertisement in / Router Solicitation out); and
  • IPv6 Neighbor Discovery (ND/NUD/DAD)

through your firewall. This site may help with that:

https://unix.stackexchange.com/questions/452880/what-are-the-essential-iptables-rules-for-ipv6-to-work-properly

-- sw

@stevewi

Thanks for that. ip/ifconfig list the address just fine, but the Linode configuration manager doesn't. Restarting networking unfortunately doesn't change anything.

@stevewi

I have to admit I'm not very knowledgeable about iptables or ufw, but as a litmus test I ran sudo ufw disable (temporarily), and rebooted, but this doesn't seem to affect the problem either.

If, as you say, your Linode seems to see the IPv6 address but it's not shown in the Cloud Manager, then I would file a support ticket about this.

As another experiment, I would spin up a new Linode with the same distro image. You should get an IPv4 address, an IPv6 SLAAC address and an IPv6 link-local address.

I have to admit I'm not very knowledgeable about iptables or ufw, but as a litmus test I ran sudo ufw disable (temporarily), and rebooted, but this doesn't seem to affect the problem either.

ufw is a (mostly Ubuntu-only) "friendly front-end" to iptables…the real firewall. You can have iptables rules that are not managed by ufw. These will still be present even if ufw is disabled. To see them, disable ufw as before and then do:

sudo iptables -L  # to see IPv4 rules
sudo ip6tables -L # to see IPv6 rules

If all your rules are managed by ufw, the three chains (INPUT, OUTPUT and FORWARD) will be empty. If you have rules that are not managed by ufw, you will see them.

-- sw

P.S. To disable your firewall completely, you need to run systemctl stop iptables. See:

https://kerneltalks.com/howto/how-to-disable-iptables-firewall-temporarily/

@stevewi

Thank you for your help. I submitted a ticket and eventually the IPv6 address had to manually assigned on Linode's end, fixing the issue.

Incidentally, on Ubuntu at least, iptables is just a command and not a service and therefore systemctl and service can't be used to disable the firewall that way. Apparently netfilter is the name of the actual firewall package, though there appears to be no easy way to turn this off, as all the tutorials I could find advise simply flushing all the rules via iptables temporarily if you want to 'turn off' the firewall.

I was fortunate in that all the relevant rules for my testing were controlled by ufw so after Linode fixed the IP issue on their end, all pings and SSH and HTTP traffic worked as expected.

Thank you again for your help regardless.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct