Restrict SSH to incoming connections over a VPN #12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, machines accept SSH connections from the open Internet. This isn't a problem per se, since authentication is correctly implemented, but it's not ideal.
For defence in depth, I'd like to set up a WireGuard VPN connecting all the machines, with SSH connections only permitted from within the network.
@randomnetcat has recommended Tailscale, but I feel sure it's realistic to implement this manually, and I'd rather not rely on a third party.
A cursory search suggests that NAT traversal with WireGuard isn't too hard.
WireGuard introduced in
c60728e7aa
seems to be working fine! It would be nice to have a mesh network rather than hub-and-spoke but possibly that's a bit optimistic with all the NAT involved.Will leave it a while to test for robustness before restricting SSH.
Split WIreGuard config out to a separate module in order to let @randomnetcat's devices connect. It's now a bit closer to a mesh network! But still not quite as advanced as Tailscale.