I have a udp forwarding to a VM with the rule
iptables -t nat -A PREROUTING -i eth0 -p udp -m udp --dport 42000:42020 -j DNAT --to-destination 192.168.1.2 iptables -t nat -A POSTROUTING -s 192.168.1.2/32 -j MASQUERADE iptables -A FORWARD -d 192.168.1.2 -p udp --dport 42000:42020 -j ACCEPT iptables -A FORWARD -s 192.168.1.2 -j ACCEPT
In the VM is are openvpn servers listening on these ports.
Now I have a strange problem with the forwarding on the host: Some packets are routed between the interfaces and some are not, without a clear pattern why.
- One VPN connection is working just fine. tcpdump shows packets on
vmneton the host and inside the VM.
- Three VPN connections are getting peer packets on
eth0which are not routed to
vmnetand vm packets on
vmnetwhich are not routed to
- UDP packets with the same sourceport and packet length as one of the failing connections sent via netcat are logged on
vmnetand inside the VM just fine.
What can I try to find why the packets are not routed to the other interface?