Setting Up WireGuard
WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner.
WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner.
On each node, to generate a public/private key type the following commands:
Create a wg0.conf
configuration file in /etc/wireguard
directory.
Update your Private and Public Keys accordingly.
Change the Endpoint to your remote node public IP or DNS address.
You must allow traffic on port 51820 UDP to your node.
To configure your firewall / port forwarding, type:
Add the service to systemd.
Start wireguard.
Check the status.
Check the status of the interfaces by running wg
Verify ping works between nodes.
Cardano-specific Configuration
Dual node setup
Example: topology.json on blockproducer { "addr": "10.0.0.2", "port": 6000, "valency": 1 },
topology.json on **relaynode1 ** { "addr": "10.0.0.1", "port": 6000, "valency": 1 },
Triple node setup
Example: topology.json on blockproducer { "addr": "10.0.0.2", "port": 6000, "valency": 1 },
{ "addr": "10.0.0.3", "port": 6000, "valency": 1 },
topology.json on **relaynode1 ** { "addr": "10.0.0.1", "port": 6000, "valency": 1 },
{ "addr": "10.0.0.3", "port": 6000, "valency": 1 },
topology.json on relaynode2 { "addr": "10.0.0.1", "port": 6000, "valency": 1 },
{ "addr": "10.0.0.2", "port": 6000, "valency": 1 },
Wireguard setup is complete.
To stop and disable WireGuard, type:
Update and/or review your topology.json file(s) and/or script to ensure the "addr" matches this new tunneled IP address, and not the usual public node IP address.