cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
916
Views
0
Helpful
0
Replies

RV340 - Wireguard/UDP not reconnecting after WAN drops

Fred Johnson
Level 1
Level 1

So we have dual failover WANs with each WAN having a separate UDP port forwarded to a LAN machine with two listening wireguard interfaces. Normally, everything works great.. until WAN2 goes down.

 

The wireguard instance outside the network will keep sending handshakes but it never receives a response. I ran some tcpdumps to get a better picture of what was going on. The wireguard instance inside the LAN receives the handshakes and responds to the handshakes, but they never make it outside the network. (I tried doing a packet capture from the RV340 router but I saw no traffic, which can't be because tcpdump on the LAN machine confirms it is receiving the handshakes and responding to them.)

 

I found some workarounds that force wireguard to fix the connection when it gets stuck:

1) Restart the outside wireguard instance which forces it to acquire a new source UDP listening port.

2) Restart the firewall by logging into the router and changing any firewall setting. (The outside wireguard keeps the same source UDP port in this case.)

 

This has been plaguing me for quite sometime. I'm not quite sure to blame the RV340 or wireguard on this one. Help me solve this mystery, thanks!

 

Edit: It seems like when WAN2 drops, the firewall drops all associated outside connections even if they were using the other WAN at the time. This causes an annoying behavior where web browsers will hang when the backup internet goes out even though the primary WAN internet is stable. Anyone else notice this?

0 Replies 0