Okay, so today I wanted to mess around with something called “nebula links.” I’d heard about them and thought it’d be cool to try setting one up myself. I didn’t really know where to start, so I just started with prepare a server for me.
Getting Started
First things first, install nebula by this command:
curl -fsSL -o * script_install_url
sudo bash *
Then, I used openssl to create a certificate authority (CA) and a key. I just ran the nebula-cert command that came with the package:
./nebula-cert ca -name "My Network"
I then create some config for my nebula network:
pki:
ca:
-----BEGIN NEBULA CERTIFICATE-----
-----END NEBULA CERTIFICATE-----
key:
-----BEGIN NEBULA X25519 PRIVATE KEY-----
-----END NEBULA X25519 PRIVATE KEY-----
static_host_map:
"192.168.100.1": ["x.x.x.x:4242"]
lighthouse:
am_lighthouse: false
interval: 60
hosts:
- 192.168.100.1
listen:
host: 0.0.0.0
port: 4242
punting:
try_interval: 5
wait_interval: 5
punchy:
punch: true
relay:
use_relays: false
am_relay: false
rebind_interval: 60
firewall:
outbound:
- port: any
proto: any
host: any
I had to do this a few times, honestly, to get the hang of it. I’m not a security expert, so it was a bit of trial and error. I think I messed up the IP addresses a couple of times, making it so the nodes couldn’t see each other.
Setting Up the Nodes
Next, I had to set up the individual nodes. I’m calling one the “lighthouse” and the other “client”.
The Lighthouse: This is like the main server. It needs a public IP address so the other nodes can find it.
client:This is connect to my lighthouse
I copied that nebula-cert command, created some config, signed it with the CA, and then transferred everything over to node.