How to bind web UI to wg0?

Wireguard configuration (wg-quick):

[Interface]
Address = 10.1.2.3
Address = 10.1.2.4
ListenPort = 51871
PrivateKey = …

[Peer]
PublicKey = …
AllowedIPs = 10.1.2.5

To access the web UI via Wireguard, I specify in the Syncthing web settings:

10.1.2.4:8384

But Syncthing won’t be available there. It just doesn’t work.

What am I missing?

Wireguard does generally work. I have a web based file browser running on 10.1.2.3:8080.

From what (external, wg0-connected?) machine with what IP address are you trying to access? Or is your “not-work-statement” meant for your local machine where SC is running?

From your answer I infer that it should work, or at least that I didn’t make any obvious mistake.

I just tested it again, and actually locally it does work. Once I change the IP to 10.1.2.4 (2nd IP on wg0) in the Syncthing web interface, that is acknowledged positively by Syncthing. In the log I find:

Nov 15 09:56:18 linux syncthing[177102]: [7JOD4] INFO: GUI and API listening on 10.1.2.4:8384
Nov 15 09:56:18 linux syncthing[177102]: [7JOD4] INFO: Access the GUI via the following URL: http://10.1.2.4:8384/

Indeed I can connect to 10.1.2.4:8384, forwarded to my local machine. That instance of Syncthing is running on a server. And on that server, I get bombarded with messages output directly onto the terminal (SSH connection):

channel 5: open failed: connect failed: Connection refused
channel 6: open failed: connect failed: Connection refused
channel 7: open failed: connect failed: Connection refused
channel 8: open failed: connect failed: Connection refused
channel 9: open failed: connect failed: Connection refused
channel 10: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 6: open failed: connect failed: Connection refused
channel 7: open failed: connect failed: Connection refused
channel 8: open failed: connect failed: Connection refused
channel 9: open failed: connect failed: Connection refused

Connection via Wireguard does not work. In fact, also the other service that I have running on Wireguard stopped working, an HTTP file server on 10.1.2.3:8080. Somehow, binding Syncthing to wg0 breaks Wireguard.

I have no idea what is going on. It’s a weird issue.

What could I try next?

Update (thinking aloud): These messages are from SSH. After binding Synchting’s web interface to a different IP, port forwarding from 127.0.1.1:8384 on the server doesn’t work anymore. (obviously)

Once again, Syncthing is not at all to blame: User error, with configuration of Wireguard and port forwarding

Solved.

2 Likes

That’s what I expected. Glad you found out yourself. :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.