Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yggdrasil changing its interface ipv6 every restart - how to make it static/fixed? #1132

Open
jhaar opened this issue Feb 29, 2024 · 4 comments

Comments

@jhaar
Copy link

jhaar commented Feb 29, 2024

Hi there

I have an Internet exposed yggdrasil server, configured to only accept incoming connections from specific pubkeys (i.e. a private "VPN"). Works fine - clients with the correct config can connect and get their own yggdrasil interface with a fixed IPv6 address. But the server itself seems to change it's yggdrasil IPv6 address every time it restarts (i.e. on restarts the clients seem to keep the same IPv6, but the server does not). Here's the config - I'm sure I've just missed some step - any ideas? This is version 0.5.5

Thanks!

# yggdrasil -normaliseconf -useconffile /etc/yggdrasil.conf
{
  PrivateKey: xxx

  Peers: [
    tls://sin.yuetau.net:6643
    tls://01.scv.usa.ygg.yt:443
  ]

  InterfacePeers: {}

  #exposed on Internet via NAT, so Listen is on RFC1918 IP
  Listen: [
    tls://internal.ip:port
    tcp://127.0.0.1:635
  ]
  MulticastInterfaces: [
    {
      Regex: .*enp2s0
      Beacon: true
      Listen: true
      Port: 0
      Priority: 0
      Password: ""
    }
  ]

  AllowedPublicKeys: [
    yyyyyyyyyy
    zzzzzzzzzz
  ]

  IfName: ygg0

  IfMTU: 65535

  NodeInfoPrivacy: false
  
  NodeInfo: {
    network_type: private
  }
}
@majestrate
Copy link
Contributor

majestrate commented Mar 1, 2024

@majestrate
Copy link
Contributor

nevermind i see you gave the private key already.

@Ravenstine
Copy link

Is it possible that your MAC address is somehow being changed every time? When running Yggdrasil within QEMU, I have to be explicit with the MAC address for the virtual network card, otherwise the IPv6 address changes every time.

@jhaar
Copy link
Author

jhaar commented Mar 27, 2024

Which MAC address? The server is a physical with a static IP, so it's not changing. To confirm that I just made a note of the Ethernet MAC and restarted yggdrasil, the Ethernet MAC stayed the same, and yet the "ygg0" interface changed it's IPv6.

Hmm, unless you are referring to the ygg0 MAC address? That is "unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00" - so it's not static. But that's how TUN interfaces always work - right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants