I'm having some weird problems with SSH and VNC on a 3B+. I've got basic firewall rules on the Pi to allow that traffic through, but I get major lag with them. I'm talking 2 minute delays. If I disable the firewall, it works fine. I see the problem on VNC both with the cloud connection and a direct connection
I have also noticed that I DON'T get this lag if I OpenVPN in to my network from outside the house. The Pi is serving the VPN.
Any suggestions on where to start looking for the cause of this problem? It prevents me from using the Pi in headless mode.
Here are my firewall rules.
sudo iptables -A INPUT -i eth0 -p $SSH_PROTOCOL -m state --state NEW,ESTABLISHED --dport $SSH_PORT -j ACCEPT sudo iptables -A INPUT -i eth0 -p $VNC_PROTOCOL -m state --state NEW,ESTABLISHED --dport $VNC_PORT -j ACCEPT
enter code here