https://www.puppet.com/community logo
Join Slack
Powered by
# voxpupuli
  • v

    VoxBot

    11/02/2022, 8:11 PM
    well i can
  • v

    VoxBot

    11/02/2022, 8:11 PM
    and i still can't figure it out
  • v

    VoxBot

    11/02/2022, 8:12 PM
    because each tunnel need to be named after both peers names otherwise you get into naming clashes
  • v

    VoxBot

    11/02/2022, 8:12 PM
    e.g. they can't all be named wg0
  • v

    VoxBot

    11/02/2022, 8:12 PM
    each tunnel is named after my peer
  • v

    VoxBot

    11/02/2022, 8:12 PM
    right
  • v

    VoxBot

    11/02/2022, 8:13 PM
    so that's this bit: @@wireguard::interface { 'curie':
  • v

    VoxBot

    11/02/2022, 8:13 PM
    or, if you will, @@interface { $hostname: }
  • v

    VoxBot

    11/02/2022, 8:13 PM
    or whatever
  • v

    VoxBot

    11/02/2022, 8:13 PM
    the problem i have is with the public_key field
  • v

    VoxBot

    11/02/2022, 8:13 PM
    you can't export the right one, because you haven't realized that yet
  • v

    VoxBot

    11/02/2022, 8:13 PM
    well you did, but you don't know you did, see what i mean?
  • v

    VoxBot

    11/02/2022, 8:14 PM
    like later i would Interface <<| |>> { addresses => ... }
  • v

    VoxBot

    11/02/2022, 8:14 PM
    but that doesn't tell me what the name of the peer is so i can reuse it in (say) dig($facts, 'wireguard_keys', $peer)
  • v

    VoxBot

    11/02/2022, 8:14 PM
    does that make sense?
  • v

    VoxBot

    11/02/2022, 8:14 PM
    https://gist.github.com/bastelfreak/fe05bdba5a2ba932469247cacba0bdab that's how I currently use it
  • v

    VoxBot

    11/02/2022, 8:15 PM
    right, so everything is hardcoded
  • v

    VoxBot

    11/02/2022, 8:15 PM
    well not everything, but the pubkey and the peer names and endpoints
  • v

    VoxBot

    11/02/2022, 8:17 PM
    I would probably try this without exported resources, but with PQL queries
  • v

    VoxBot

    11/02/2022, 8:17 PM
    oh dear, this is not going to work at all... i can't have the same address on all those tunnels
  • v

    VoxBot

    11/02/2022, 8:17 PM
    why not?
  • v

    VoxBot

    11/02/2022, 8:17 PM
    can't i?
  • v

    VoxBot

    11/02/2022, 8:17 PM
    on the local machine? yes you can
  • v

    VoxBot

    11/02/2022, 8:17 PM
    oh neat
  • v

    VoxBot

    11/02/2022, 8:17 PM
    okay, so that should work
  • v

    VoxBot

    11/02/2022, 8:18 PM
    i just need to figure out the pubkey stuff then
  • v

    VoxBot

    11/02/2022, 8:18 PM
    tip: internet routers do that since 30 years and it works well on linux
  • v

    VoxBot

    11/02/2022, 8:18 PM
    just looks odd :D
  • v

    VoxBot

    11/02/2022, 8:19 PM
    okay, so i have this now https://paste.anarc.at/publish/2022-11-02-nEe1p3664T8wpFE9nQT9F--oFasJnAfNvClMfu5Ajnw/stdin.txt
  • v

    VoxBot

    11/02/2022, 8:19 PM
    all my wireguard interfaces on one box have the same IPv4 and IPv6 IP. it's a naming convention. that allows me also to calculate the ip for peers
1...177178179...648Latest