I was struggling to connect to wireguard vpn server when while on universities wifi.
I am able to bypass the restrictions on my universities Wi-Fi network by connecting to my phone’s hotspot first from my laptop and then connecting to a WireGuard VPN before finally connecting to the school’s Wi-Fi and disconnecting from my phones hotspot. This method has been working for me and I’m curious to know why.
Does anyone have any insights or ideas about why this method might be effective in bypassing the restrictions on my universities Wi-Fi network?
Your Uni is blocking the wireguard handskake process using deep packet inspection. Thats how most orgs block wireguard, it cant discern what kind of traffic is happening after the handshake so it doesnt block it, but to your Unis firewall can certainly tell what a wireguard handshake is, youre bypassing DPI by handshaking on a different network, it still works after you join Uni network because the handshake is still valid.
This is usually done using libraries of different network behaviour and wireguard is lumped in by default because its included in one of those libraries.
A lot of uni or school networks deny udp traffic, therfore you cannot establish a direct connection.
The rule is limited to initiate a connection, but does not apply for “active” or established connections.
Since your wg interface has the state of established/waiting and not initializing, the switch of networks is just an interrupt or package loss. It just sends the next keepalive from a new (external) ip and the server back home acknowledges and adapt to it.
So you bypass the restriction of initializing by switching networks…
Maybe, maybe not but i think it could be plausable
I also tried two different programs called udptunnel but their network implementation conflicted with WireGuard’s- and performance tunneling over real TCP is appalling.
Any updates on this? My school just updated
their filters and I can no longer use OpenVPN on 443 (tcp). I’ve installed WireGuard and have the same problem with initial connection. If I use cellular data and connect and then turn “on” Wi-Fi it keep my VPN connection alive but I can’t initiate WireGuard on the Wi-Fi.
I have a perfect solution, if anyone was wondering it’s just a click of a Windows settings of the wifi of your choice, in your case the school wifi, while you have access to the network and resetting the wifi dropdown menu ( by turning wifi on and off ) you can effectively walk through the barrier!
Server config. This is a VPS under my control somewhere in the Internet.
33.33.33.33 represents the public IP addres of that server. 12345 represents the wireguard listen port on the server. 6789 represents the local tunnel listen port on my laptop. 443 is the udp tunnel listen port on the server- this is probably the most likely one to be successful but you can change it.