RP(1)

πŸ“¦ version 0.2.3, in nixos 26.05, nixpkgs unstable

πŸ¦‹ rp(1) β€” the high-level interface to rosenpass, bestie edition

okay so this is rp(1), a General Commands Manual page, and it's literally the glow-up wrapper that lets you build a whole VPN with WireGuard and Rosenpass without losing your mind πŸ’…


✨ NAME ✨

rp β€” high-level interface to rosenpass. that's it, that's the vibe.


🌸 SYNOPSIS 🌸

rp [explain] [verbose] genkey ... | pubkey ... | exchange ...
rp [...] genkey PRIVATE_KEYS_DIR
rp [...] pubkey PRIVATE_KEYS_DIR PUBLIC_KEYS_DIR
rp [...] exchange PRIVATE_KEYS_DIR [dev <device>] [listen <ip>:<port>]
   [peer PUBLIC_KEYS_DIR [endpoint <ip>:<port>] [persistent-keepalive
   <interval>] [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>] ...]] ...

like… look at that. iconic. no cap, it's a lot of brackets, but we move 🫢


πŸ’– DESCRIPTION πŸ’–

The rp program is the whole reason you're here: it's used to build a VPN with WireGuard and Rosenpass. two technologies, one little command, main character energy fr fr ✨

The optional [explain] and [verbose] options? bestie, those are your besties. use them to obtain further help, or to enable a detailed view on the operations, respectively. like turning the lights on in the group chat πŸ”₯


πŸŽ€ COMMANDS πŸŽ€

  • genkey PRIVATE_KEYS_DIR β€” creates a new directory with appropriate permissions (it's giving responsible), and generates all the necessary private keys required for a peer to participate in a rosenpass connection. your keys, your business πŸ”
  • pubkey PRIVATE_KEYS_DIR PUBLIC_KEYS_DIR β€” creates a fresh directory at PUBLIC_KEYS_DIR, and it contains the extracted public keys from the private keys generated by genkey and located inside PRIVATE_KEYS_DIR. basically the shareable version. the one you actually send to people πŸ’Œ
  • exchange PRIVATE_KEYS_DIR [dev <device>] [listen <ip>:<port>] [PEERS] β€” starts the VPN on interface device, listening on the provided IP and port combination, allowing connections from PEERS. this is the moment. the VPN is vpn-ing 🌈

⭐ EXIT STATUS ⭐

The rp utility exits 0 on success, and >0 if an error occurs. so like, zero means slay, anything else means something's up 😭


πŸ“ EXAMPLES πŸ“

okay this is the fun part, get comfy 🧚

In this example, we will assume that the server has an interface bound to 192.168.0.1, that accepts incoming connections on port 9999/UDP for Rosenpass and port 10000/UDP for WireGuard.

To create a VPN connection, start by generating secret keys on both hosts.

rp genkey server.rosenpass-secret
rp genkey client.rosenpass-secret

Extract the public keys:

rp pubkey server.rosenpass-secret server.rosenpass-public
rp pubkey client.rosenpass-secret client.rosenpass-public

Copy the "-public" directories to the other peers and then start the VPN. On the server:

sudo rp exchange server.rosenpass-secret dev rosenpass0 listen 192.168.0.1:9999 \
    peer client.rosenpass-public allowed-ips fe80::/64

On the client:

sudo rp exchange client.rosenpass-secret dev rosenpass 0 \
    peer server.rosenpass-public endpoint 192.168.0.1:9999 allowed-ips fe80::/64

Assign IP addresses:

sudo ip a add fe80::1/64 dev rosenpass0 # Server
sudo ip a add fe80::2/64 dev rosenpass0 # Client

Test the connection by pinging the server on the client machine:

ping fe80::1%rosenpass0 # Client

You can watch how rosenpass replaces the WireGuard PSK with the following:

watch -n 0.2 'wg show all; wg show all preshared-keys'
ngl, that last one is lowkey mesmerizing. just watching the PSK get swapped on loop? obsessed πŸ‘€

πŸ”₯ SEE ALSO πŸ”₯

rosenpass(1), wg(1) β€” go read these too, iykyk πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

Rosenpass was created by Karolin Varner, Benjamin Lipp, Wanja Zaeske, Marei Peischl, Stephan Ajuvo, and Lisa Schmidt. absolute legends, all of them πŸ’–

This manual page was written by Emil Engler. thank you for your service 🫢


πŸ’€ BUGS πŸ’€

The bugs are tracked at https://github.com/rosenpass/rosenpass/issues. found one? go tell them, don't suffer in silence bestie πŸ™ˆ


aaand that's the page! πŸŽ€ cute little sign-off: this is from the Debian folks, dated $Mdocdate$, and it's RP(1) β€” go build a VPN, you've got this πŸ’…βœ¨

πŸ“¦ where this page comes from