Why Nostr? What is Njump?
2024-07-03 12:06:36
in reply to

mleku on Nostr: so, you follow your normal thing, log into your VPS via SSH with the long root ...

so, you follow your normal thing, log into your VPS via SSH with the long root password they generate for you

then you need this https://github.com/angristan/wireguard-install to set up a wireguard tunnel and a client

set your pc up to run the wireguard tunnel (it's just a matter of installing wireguard on linux, the actual code is in the kernel, the package just adds the services setup) and you drop the config generated by that script into /etc/wireguard/wg0.conf

next, you need to probably take advantage of the VNC cli root shell that most VPS providers give you, as if you lose SSH access in this process you cannot get in via that path

you need to change the ssh configuration on the VPS so instead of listening on 0.0.0.0 it only listens on 10.0.0.1 - the usual IP address, just run `ip a` to see the wg0 once you have done that install with the script, whatever it is, your clients will have sequential numbers after that like, the first one is usually ending in 2

then, you need to also add `[email protected]` to the "After" line in the /etc/systemd/system/ssh.service (i'm assuming your VPS runs ubuntu, which i recommend for easy finding of howto info and fixes for problems) so that the SSH waits until the address it will listen to is up

then after that you should be able to log in via

ssh [email protected]

and of course it is recommended to also reconfigure SSH to use only certificate authentication and put your id_ed25519.pub into /root/.ssh/authorized_keys

and that's the whole thing

after that, you can reboot your VPS and you will be able to connect via SSH only via wireguard, and by default the IP address that internet servers will see is your VPS, i use this on mine, rented a cheap VPS in romania for $35 for a year with minimal specs, all it has is a reverse proxy and wireguard VPN server, and that also allows me to run internet-reachable services as i was using to do testing with my relay development, and currently run my own instance of nostrudel for nostr client
Author Public Key
npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku