Bypassing VPN blockage on public networks - 07/05/2025
I have noticed that at some public networks, my wireguard
vpn is blocked. To bypass this, I changed the port on
my vpn server to port 123. Port 123 UDP (wireguard also uses UDP) is the same port used for time
servers, which every computer needs to get the correct time.
I then reconfigured the vpn configs, and boom!
The vpn works on all networks now, with no hiccups.
For my vpn setup, I used pivpn.
To change the ports after installation, modify the files
/etc/wireguard/wg0.conf
/etc/pivpn/setupVars.conf
Then reload wireguard (sudo
systemctl restart wg-quick@wg0)
You also need to recreate all vpn users.
(delete them and remake them using pivpn -a)
If it still doesn't work, you may need to uninstall (pivpn
uninstall) and reinstall pivpn.(curl -L https://install.pivpn.io
| bash)
If you find it still doesn't work, it may be the case that the network
blocks all UDP traffic. You can potentially bypass this by using openvpn, and
configuring it to use TCP instead of UDP. I however am not too knowledgable on this subject, so please do your research.
Thank you for reading till the end! I hope you enjoyed. If you have any
questions or contact, shoot me an email me at [email protected]
