Ah, I see you made it going in as root!
If the wg0 exists, then you’ll need to drop the interface down and then up again. As root, type in:
wg-quick down wg0
wg-quick up wg0
To see the status of your WireGuard, you can do so (once all is ready), by typingL
I hope this helps!
Hello again, I’m actually pretty happy because I have made it farther than I thought this evening. However, I just got an error about the key. Can you look at these and see what I did? Also, I’m not sure if I got my ip address correct.
Hello again, @LibertyMom!
This error is strange indeed. I created a Linode to test it out - but I get pulled all over the place. If you can give me a tad bit of time, I’ll go through the steps personally and pinpoint the issue.
Of course! I appreciate your time so much. I’m not in a rush and I know you’re a busy man. Let me know when you can.
You’re most welcome, @LibertyMom! I did my first tests last night (I slept late again), and I was able to go through your issue. However, I encountered another snug, which takes my system off-line when I sync to the WireGuard VPN. My guess is that it has to do with the firewall configuration, as I used CentOS for the server setup (WireGuard is more reliable there).
I will do more tests later today/tonight, so I will come back with a full solution.
The key issues you’re having is because you’ll need to be running two terminals at once. One on your server and one on your local system. Each of those need to exchange public keys. This means you’ll need to copy the server’s public to your local configuration file and your local public key to your server’s configuration file. Then your error will disappear. However, make sure that the WireGuard interface is down when you change the configuration.
Thank you for checking in to this. By the way, there’s a user on this forum name Nestling that also tried to install Wireguard and had a similar problem. I will look for the post and try to link it. I think their internet connection would turn off whenever they turned WG on. VPN and VPS Setup - #11 by Nestling
Hey Vasileios, I was poking around again on my VPS and noticed that apparently I have 2 peers going, and I really only want 1. I’m not sure how I did this. What should I do to fix it?
The second peer is in your wg0.conf file. Drop the VPN service and then edit the configuration file to take out the peer you want.
Today I’ll go finish @Will 's LMS video on securing your server - and not a moment too soon! I found over 6,000 failed login attempts on my VPN and had to harden its security. I trust your passwords are rather complex past the SSH keys.
Vasileios, I went through the tutorial again and thought I had fixed my problem, but then got a new error. (See picture) I’m ready to delete everything and start over using this script from Git Hub, which was recommended and recently used by
Jenny8675309. Do you think this is a good idea? I’m getting frustrated and this looks easier. Setting up Wireguard on Linode - #9 by Jenny8675309
If I start over, I need to know how to delete everything. Feeling overwhelmed right now.
I see what 's going on here!
In your wg0.conf file you haven’t placed the actual private key from your local system. You can see which key it is (on your client system) by typing:
sudo cat /etc/wireguard/privatekey
Copy the output line, then go to your wg0.conf and replace the <CLIENT_PRIVATE_KEY> with the output of the above command.
The process is a bit complex as you have to basically include your local system’s public key to the server’s wg0.conf and the server’s public key to your local wg0.conf.
Worst case scenario, you can rebuild your VPS via the option your provider has and use the script if it indeed makes your life easier.
Hey Vasileios, do I have to bring ‘up’ the interface with sudo wg-quick up wg0 on both my computer and the VPS for the tunneling to work? I think I had it working, but I couldn’t load certain websites and I couldn’t upload a screenshot. I just brought them both ‘down’ to send this. On whatismyip dot com it said IP address not detected. Also, when I click on my ethernet connection the pop-up window says ‘disconnected’, but it is connected. (?)
You might be encountering the connection issue. Generally, when you take your WireGuard up or down, there’s a useful command to immediately see your IP address change from your home computer’s terminal.
sudo curl ifconfig.me
If that produces an error, you might need to install the network tools via:
sudo apt install net-tools
If you connect/handshake to the server and your ifconfig.me seems to freeze, it means that there’s some internet hiccup. I’m looking around it to see what is causing it & it would appear we’re not the only ones who are experiencing it for some reason.
Hi there, I just want to confirm that the procedure for turning on the Wireguard VPN is bringing it ‘up’ with “sudo wg-quick up wg0” on both my device and the VPS, is that correct?
I will try it again and check my IP address with the command you just suggested.
Yes. First run it on the server and then on your client. I will do another test run tonight. This time I’ll try the Debian VPS distro, as it’s known for its insane stability.
Vasileios, I’m having trouble. After bringing Wg up, I am not able to connect to my VPS at all. What can I do now? I can’t connect to my VPS to take WG down. The command line freezes, then after a while says ‘connection timed out.’
No worries, no panic! I had this happen to me too!
There is a solution!
You can go to your Linode VPS control panel and select these options:
This will allow you to login as root and bring the WG down.
Okay, I won’t panic, except I’m not on Linode, I’m on Digital Ocean.
Digital Ocean should gave something that ends up in SH - as an emergency console.
Okay, I signed into the website and brought up the console and was able to bring WG down. Whew! lol. I’m starting to wonder if I should go with OpenVPN instead.
Re: OpenVPN, I personally recommend it to many.
However, with OpenVPN, you will only be able to connect 2 systems at a time. That’s the only drawback of it. Otherwise, it’s less of a hassle.