[Fixed] Weird Wireguard issues I could use some help with.
I’ve hit a wall with a weird Wireguard issue. I’m trying to connect my phone (over cell) to my home router using wireguard and it will not connect.
- The keys are all correct.
- The IPs are all correct.
- The ports are open on the firewall.
- My router has a public IP, no CGNAT.
The router is opnsense, I have a tcpdump session going and when I attempt a connection from the phone I see 0 packets on that port. I am able to ping the router and reach the web server sitting behind it from the phone.
I have a VPS that I configured WG on and the phone connects fine to that. I also tested configuring the VPS to connect to my home router and that also works fine.
I’m really at a loss as to where to go next.
Edit 2: I completely blew out the config on both sides and rebuilt it from scratch, using a different UDP port, and it all appears to be working now. Thanks for everyone’s help in tracking this down.
Edit: It was requested I provide my configs.
opnsense:
<span style="color:#323232;">####################################################
</span><span style="color:#323232;"># Interface settings, not used by `wg` #
</span><span style="color:#323232;"># Only used for reference and detection of changes #
</span><span style="color:#323232;"># in the configuration #
</span><span style="color:#323232;">####################################################
</span><span style="color:#323232;"># Address = 172.31.254.1/24
</span><span style="color:#323232;"># DNS =
</span><span style="color:#323232;"># MTU =
</span><span style="color:#323232;"># disableroutes = 0
</span><span style="color:#323232;"># gateway =
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Interface]
</span><span style="color:#323232;">PrivateKey =
</span><span style="color:#323232;">ListenPort = 51821
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Peer]
</span><span style="color:#323232;"># friendly_name = note20
</span><span style="color:#323232;">PublicKey =
</span><span style="color:#323232;">AllowedIPs = 172.31.254.100/32
</span>
Android:
<span style="color:#323232;">[Interface]
</span><span style="color:#323232;">Address = 172.31.254.100/32
</span><span style="color:#323232;">PrivateKey =
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Peer]
</span><span style="color:#323232;">AllowedIPs = 0.0.0.0/32
</span><span style="color:#323232;">Endpoint = :51821
</span><span style="color:#323232;">PublicKey =
</span>