I can barely put into words the problem I'm having, but I'll give it a go.
I have a pfsense router on which I've set up openvpn to act as a client to connect into another network.
This has worked flawlessly for months, but is now no longer working. I've made what I believe to be unrelated changes to the firewall and taken to few backups to be able to roll back and verify if they might be the source of the problem.
I've tried moving the openvpn connection from udp to tcp with the hope of that fixing if the cause was a flaky connection. No diff.
Utilizing the tunnel on the firewall itself seem to work flawlessly.
Setting up the same tunnel on my laptop seem to work flawlessly.
But when the tunnel is up and (different) units on my lan try to traverse it it does not work properly. The weirdest but most reliable example I have of the problem is pinging a remote unit. It works every second time. If ping works all packages in the same ping-run get proper replies. If I ctrl-c
and try again every package fails instead. This can be repeated indefinitely.
How can this behaviour possibly be explained?
Something to describe the environment:
On the firewall I can see the traffic on the LAN interface with tcpdump like so:
# echo "FAILED"; tcpdump -i igb0 -n -vvv host 172.16.66.2 and icmp
FAILED
tcpdump: listening on igb0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:35:04.521732 IP (tos 0x0, ttl 64, id 25001, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 58627, seq 0, length 64
21:35:05.527179 IP (tos 0x0, ttl 64, id 16857, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 58627, seq 1, length 64
21:35:06.532373 IP (tos 0x0, ttl 64, id 31585, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 58627, seq 2, length 64
21:35:07.533037 IP (tos 0x0, ttl 64, id 46426, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 58627, seq 3, length 64
21:35:08.538315 IP (tos 0x0, ttl 64, id 41339, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 58627, seq 4, length 64
and the next attempt:
# echo "SUCCESS"; tcpdump -i igb0 -n -vvv host 172.16.66.2 and icmp
SUCCESS
tcpdump: listening on igb0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:35:23.228088 IP (tos 0x0, ttl 64, id 32178, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 60163, seq 0, length 64
21:35:23.237680 IP (tos 0x0, ttl 63, id 54367, offset 0, flags [none], proto ICMP (1), length 84)
172.16.66.2 > 10.11.12.182: ICMP echo reply, id 60163, seq 0, length 64
21:35:24.229373 IP (tos 0x0, ttl 64, id 38273, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 60163, seq 1, length 64
21:35:24.238655 IP (tos 0x0, ttl 63, id 54368, offset 0, flags [none], proto ICMP (1), length 84)
172.16.66.2 > 10.11.12.182: ICMP echo reply, id 60163, seq 1, length 64
21:35:25.230248 IP (tos 0x0, ttl 64, id 13988, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 60163, seq 2, length 64
21:35:25.239532 IP (tos 0x0, ttl 63, id 54369, offset 0, flags [none], proto ICMP (1), length 84)
172.16.66.2 > 10.11.12.182: ICMP echo reply, id 60163, seq 2, length 64
21:35:26.235280 IP (tos 0x0, ttl 64, id 62651, offset 0, flags [none], proto ICMP (1), length 84)
10.11.12.182 > 172.16.66.2: ICMP echo request, id 60163, seq 3, length 64
21:35:26.244645 IP (tos 0x0, ttl 63, id 54370, offset 0, flags [none], proto ICMP (1), length 84)
172.16.66.2 > 10.11.12.182: ICMP echo reply, id 60163, seq 3, length 64
I can't say I see anything differentiating the working packages from the ignored ones.
Using the same tcpdump (more or less, adjusted for openvpn NAT) I have been able to verify that the ping packets that don't get any replies never reach the remote end. The ones that do do of course arrive as expected.
{}
).