Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 on Linux & BSD & Mac => Topic started by: KNBu5ZMdbR on October 24, 2022, 11:41:08 AM

Title: netplan with a dynamic local IP
Post by: KNBu5ZMdbR on October 24, 2022, 11:41:08 AM
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.
Title: Re: netplan with a dynamic local IP
Post by: kcochran on October 27, 2022, 11:02:26 AM
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.
Title: Re: netplan with a dynamic local IP
Post by: elauriault on January 15, 2023, 10:27:03 AM
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