Re: OpenVPN suddenly working one way only

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Fri, 05 Jul 2024 09:31:40 UTC
Van: Andrea Venturoli <ml@netfence.it>
Datum: vrijdag, 5 juli 2024 11:18
Aan: freebsd-net@freebsd.org
Onderwerp: OpenVPN suddenly working one way only
> 
> Hello.
> 
> Not sure this is a question for FreeBSD or for OpenVPN directly... I'll try here first.
> 
> I'm using OpenVPN quite heavily, as I have around 10 server-server tunnels, and several server-clients installations.
> They are all working properly except one, which will periodically start misbehaving.
> Both ends are FreeBSD 13.3, the protocol is UDP and I'm using tun interfaces.
> 
> Simply put: handshake is gine, packets from host A to B get through, but packets from B to A do not.
> I can run tcpdump on both tun interfaces:
> _ if I ping A -> B, A sees packets going out, but none coming in, although B sees both;
> _ if I ping B -> A, B sees packets going out, but A sees nothing.
> 
> Restarting openvpn on both ends does not help: handskake happens again, but the situation does not change. Looks more like a kernel/tun problem...
> Possibly rebooting (A or B?) would solve, but I can't do that easily.
> Also, I'm sure in some days (possibly weeks) it'll start working fine again by itself (!!!).
> 
> Notice that both ends have other OpenVPN tunnels to different systems and they keep working while this one is not.
> 
> Has anyone else seen something similar?
> Anything to try/check now that I'm getting the problem and I have no urge to solve?
> 
>   bye & Thanks
>     av.
>  
> 
> 
> 


Of course this can be a firewall or routing issue somewhere in between the hosts blocking traffic from B to A.

Don't you see unencrypted traffic going in and out of tun? Or don't you see encrypted (but expected) traffic going through the "physical" network? Or both? Can you run tcpdump on the physical interfaces? What traffic do you see on the openvpn port?

Can you switch to TCP? As that will give more errors when something is wrong in the connection instead of just silently dropped packages as UDP can do.

Regards,
Ronald.