Hi. I’m trying to customize my syncthing configuration not using the default port 22000. After 5 hours doing some tests, I haven’t been able to configure the way I have in mind. Here is my problem:
Let’s say I want to use port 22001 instead of 22000 on computer (A). I have opened both ports (22000 and 22001) in my router pointing to my linux machine (A) with syncthing 0.14.9. No firewalls etc.
My other device for tests (B) is windows machine 30km away which router ports are not configured. I read that only one machine at one side is needed to be configured-open to be able to do a direct connection (seems true when testing, see:).
They sync without problem but by default they do it through a relay. It’s logical, by default both routers has ports closed.
If set them this way:
Machine (A) port 22000 open (confirmed OPEN as soon as I run syncthing service (checked using canyouseeme.org) Syncthing settings->Sync Protocol Listen Addresses->‘default’
root@raspberrypi:/home/pi/.config/syncthing# netstat -tulpn |grep syncthing
tcp6 0 0 :::9084 :::* LISTEN 5756/syncthing
tcp6 0 0 :::22000 :::* LISTEN 5756/syncthing
udp 0 0 0.0.0.0:21027 0.0.0.0:* 5756/syncthing
udp 0 0 0.0.0.0:33377 0.0.0.0:* 5756/syncthing
udp6 0 0 :::39614 :::* 5756/syncthing
udp6 0 0 :::21027 :::* 5756/syncthing
(notice syncthing listening on port 22000)
Machine (B) ports unconfigured Syncthing settings->Sync Protocol Listen Addresses->‘default’
Correct behaviour. Direct connection between both machines. Not relay used. No red alert sign.
------------TRYING TO CHANGE DEFAULT PORT TO 22001 on (A). Machine (A) Syncthing settings->Sync Protocol Listen Addresses-> ':22001’ port 22001 open on router (seems closed after starting syncthing)
root@raspberrypi:/home/pi/.config/syncthing# netstat -tulpn |grep syncthing
tcp6 0 0 :::9084 :::* LISTEN 5899/syncthing
udp 0 0 0.0.0.0:21027 0.0.0.0:* 5899/syncthing
udp 0 0 0.0.0.0:58775 0.0.0.0:* 5899/syncthing
udp6 0 0 :::59837 :::* 5899/syncthing
udp6 0 0 :::21027 :::* 5899/syncthing
(notice syncthing listening port dissapeared. Neither 22000 or 22001)
Machine (B) ports unconfigured Syncthing settings->Sync Protocol Listen Addresses->‘default’
Wrong behaivour. Connect using relay. Red exclamation alert sign. Why is not using port 22001?.
Is like syncthing don’t like the way I enter the ‘sync protocol listen address’ field. I tried: ’:22001’ also ‘0.0.0.0:22001’ and I think ‘[::]:22001’. The only thing that work and that make netstat reflect an open port is entering ‘default’ on that field, but I’m restricted to 22000 that way.
Am I doing something wrong with the syntax? (I tried editing config.xml too, no luck). What should I do to use my personallized ports?.
Thanks for your help.