Trying out DietPi for use with WireGuard today. Installed a fresh installation of DietPi on my RPi4 and booted up, everything was normal. Let the image do it’s thing and update everything to latest.
Installed WireGuard through the DietPi software installation stuff.
Set the server IP to use to XXXXXX.duckdns.org, which points to my public IP.
Left the port as default 51820.
Rebooted once installation was done (it forced me).
Trying to set it up on my iPhone, I ran the command
grep -v '^#' /etc/wireguard/wg0-client.conf | qrencode -t ansiutf8
to generate a QR code and I added it to my iPhone. Went onto my Orbi system and enabled PortForwarding for the default port number 51820. Disabled uPnP (people had problems with that). Rebooted router.
Connected does not work. Tries to connect, fails, tries to connect, fails, again and again.
Did a DNS lookup on my duckdns URL → correctly points to my public IP
Then made sure wireguard was running → running
wg show
shows that the interface wg0 is in fact running on port 51820.
Then ran
nmap -sT -O localhost
, the results show that only ports 22, 53, and 80 are open. Running
nc -zv 192.168.1.XX 51820
on another local system fails with connection refused, which means that port 51820 is in fact not open.
Why is the port not open? I rebooted WireGuard and DietPi multiple times, nothing. Any thoughts?
EDIT:
Running
ss -lun 'sport = :51820'
does in fact show that the port is open, but the state is UNCONN
. If this is the case, my port forward should be working but it is not? And also why can’t I see the port on my other local machines?