• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Main Menu

netplan with a dynamic local IP

Started by KNBu5ZMdbR, October 24, 2022, 11:41:08 AM

Previous topic - Next topic

KNBu5ZMdbR

Hi.   I've had a working HE ipv6 tunnel going to many years now and I think it's time I upgraded.
My current system is on a 32-bit ubuntu 18.04 VM using `/etc/network/interfaces` and that approach to networking has been deprecated.  netplan seems to be the replacement.

So:
1. Should I be using netplan in my 64-bit ubuntu 22.10 VM?

2. How do I set the local side of the tunnel?   The Tunnel Details -> Example Configuration for Netplan (linux) has "network.tunnels.he-ipv6.local" hard coded to my ISP-assigned IPv4 address.
That address changes from time to time.   With `/etc/network/interfaces`, I didn't have to specify the local address and I have it configured via  a cronjob running at reboot and every four hours after that to tell HE the address (in case it changes).

Do I now need to also rewrite the netplan YAML when my public IPv4 address changes?   This seems like a step backwards.

kcochran

I see there's a command netplan-set documented which looks to be useful for setting specific elements in an existing file, which avoid the need of rewriting the entire YAML file, but not seeing anything for Netplan to attempt to auto-detect the local IP for a tunnel.

elauriault

Here is the netplan yaml I use for the he tunnel on 22.04:

network:
  version: 2
  renderer: networkd
  tunnels:
    he-ipv6:
      addresses:
      - "xxx/64"
      mode: "sit"
      local: "0.0.0.0"
      remote: "yyy"
      routes:
        - to: ::/0
          scope: link