Skip to content

benhunter/nebula-docker-quickstart

Repository files navigation

Nebula Docker Quickstart

A Nebula overlay network in Docker Compose. Configures a Lighthouse and two server endpoints. Demonstrates nginx and ssh accessible only from inside the overlay network.

Based on the Nebula Quick Start Guide. Tested on Mac with M1 Apple Silicon.

Setup

./setup-mac.sh
docker compose up -d --build

SSH

docker compose exec netshoot2 ssh [email protected]

Won't work outside overlay:

docker compose exec netshoot2 ssh [email protected]

Nginx

docker compose exec netshoot2 http 192.168.100.11

Won't work outside overlay:

docker compose exec netshoot2 http 192.168.42.11

ICMP

docker compose exec server1 ping 192.168.100.1 -c 2
docker compose exec server1 ping 192.168.42.42 -c 2
docker compose exec server1 ping 192.168.100.12 -c 2
docker compose exec server1 ping 192.168.42.12 -c 2
docker compose exec lighthouse ping 192.168.100.11 -c 2
docker compose exec lighthouse ping 192.168.42.11 -c 2
docker compose exec lighthouse ping 192.168.100.12 -c 2
docker compose exec lighthouse ping 192.168.42.12 -c 2
docker compose exec server2 ping 192.168.100.1 -c 2
docker compose exec server2 ping 192.168.42.42 -c 2
docker compose exec server2 ping 192.168.100.11 -c 2
docker compose exec server2 ping 192.168.42.11 -c 2

Iterate

docker compose down && docker compose up -d --build

Run single container with normal nebula entrypoint

docker run --rm -v ./lighthouse/config.yaml:/config/config.yaml -v ./lighthouse/pki:/etc/nebula --cap-add=NET_ADMIN --device /dev/net/tun nebula-alpine

Run and attach to shell

docker run -it --rm -v ./lighthouse/config.yaml:/config/config.yaml -v ./lighthouse/pki:/etc/nebula --cap-add=NET_ADMIN --device /dev/net/tun --entrypoint sh nebula-alpine

Direct ssh (would reqire a host port mapping)

ssh -i ubuntu-ssh/ssh_keys/id_rsa -p 2222 root@localhost

Releases

No releases published

Packages

No packages published