Skip to content

bsd-ac/dn42-autopeer

Repository files navigation

Auto Peering for DN42

Program to set up an auto peering service for DN42 on OpenBSD.

Installation

pip install dn42-autopeer

Usage

$ env GIT_SSH_COMMAND="ssh -i /home/user/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o IdentitiesOnly=yes" \
    autopeer -f /etc/autopeer.conf

Autopeer

Anyone can request to peer with your ASN by sending a POST request to the appropriate endpoint. The request must be signed with their GPG key, the autopeer server will verify the signature and add the peer to the list. The signature is verified by fetching the GPG key for the email registered by the user in the DN42 registry.

$ cat request.json | gpg --sign --detach-sig - | base64 -w 0 > request.sig
$ curl -w '\n' -X POST -d @request.json \
    -H "Content-Type: application/json" \
    -H "X-DN42-Signature: $(cat request.sig)" \
    -H "X-DN42-ASN: 4242420000" \
    https://dn42-nue.bsd.ac/autopeer

Internals

What it does: - Fetches and keeps the DN42 registry updated in a local folder. - Manages wireguard configurations for a peer on request. - Manages BGP configurations for a peer on request.

User authentication works by verifying the GPG signature of the request. GPG keys are fetched from the DN42 registry.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published