I started using syncthing just few days ago. I have two linux computers with UFW blocking anything but my VPN connections. I allowed syncthing and also ports 22000 and 21027 (just to make sure) for UFW. I have also forwarded the port 22000 from my router and VPN settings. Syncthing still doesn’t connect to tcp-server, but only to relay-server. Did I forget something? It also doesn’t connect to my android device at all. When UFW is turned off everything works just fine.
In the web interface the discovery is 3/8.
This doesn’t mean much, it just shows that it’s listening, but that doesn’t mean the kernel lets the traffic through. Best if you do some sort of netcat test.
Thanks, I’m quite new on these internet-things. But I got it solved. Apparently allow syncthing won’t allow outbound connections. So allowing outbound connections for the ports manually made it work. Thank you for getting me on the right track!