Page 1 of 1

Problems remote controlling a Linux client (7.5.1)

Posted: Mon Apr 06, 2020 12:39 pm
by Jopj
Hey,

Just started folding on a headless PC running Ubuntu 18.04.4 and client version 7.5.1. It works, finishes work units and all that but I'm having trouble remotely connecting to the client. The PC I'm connecting from (windows 10 machine) is connected to the same router as the linux one, both are in the 192.168.1 subnet, can ping eachoter, move files over SMB and so on. After looking around some tutorials on the subject, I added the following to config.xml and restarted the service (and the pc just in case after the n:th try).

Code: Select all

  <!-- HTTP Server -->
  <allow v='127.0.0.1 192.168.1.0/24'/>

  <!-- Remote Command Server -->
  <command-allow v='127.0.0.1 192.168.1.0/24'/>
  <command-allow-no-pass v='127.0.0.1 192.168.1.0/24'/>
  <password v='setiauth'/>

  <!-- Web Server -->
  <web-allow v='127.0.0.1 192.168.1.0/24'/>

Neither using FAHControl (port 36330) or the web interface at port 7396 work. I know I'm modifying the right configuration file and it's loading the settings, as those get printed to /var/lib/fahclient/log.txt.
After some searching, I figured out that FAHClient uses telnet to do it's thing, and that can be used to debug these problems. Telnet doesn't work for me, I just get the usual "could not open connection to the host" error. I think the issue is on the linux host side as according to Wireshark, the telnet queries are leaving the Windows PC as they should (I added exception to the Windows firewall). It appears that port 36330 is open on the Linux PC though, I get:

Code: Select all

jopj@capsize:/var/lib/fahclient$ sudo lsof -i:36330
COMMAND    PID      USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
FAHClient 1141 fahclient    9u  IPv4  21127      0t0  TCP *:36330 (LISTEN)
So the question remains, if the Linux PC is listening on that port, and the Windows PC is observably trying to reach it on that same port, why is nothing getting through? What am I doing wrong?

Both PCs are connected with wired Ethernet to that common router, and the Linux one has only a single network interface just in case that could cause issues.

Re: Problems remote controlling a Linux client (7.5.1)

Posted: Mon Apr 06, 2020 3:09 pm
by regchan
use the advanced control to manage it

hit add
enter details name
address ip/hostname
leave port
enter password if you have one

yu can controle it here

Re: Problems remote controlling a Linux client (7.5.1)

Posted: Mon Apr 06, 2020 3:17 pm
by Joe_H
Also, any changes to the network settings to allow remote connections have to be followed by a restart of the folding client FAHClient process. If you use paswordless connections on your LAN, you also have enter net addresses where that is allowed.

As for telnet, that works on port 36330 on local net address 127.0.0.1 by default. Until changes are made to allow from a remote address, its port is closed otherwise. You may also need to use another telnet app on your PC, the one supplied with Windows handles character transmission in a way that does not work with FAHClient properly.

Re: Problems remote controlling a Linux client (7.5.1)

Posted: Mon Apr 06, 2020 3:44 pm
by ipkh
In addition, please check to see if you'll need to add an exception to the linux firewall. Many distributions will block remote access by default.

Re: Problems remote controlling a Linux client (7.5.1)

Posted: Mon Apr 06, 2020 5:50 pm
by Jopj
regchan wrote:use the advanced control to manage it

hit add
enter details name
address ip/hostname
leave port
enter password if you have one

yu can controle it here
That's what I'm doing, and it's not working :(
Joe_H wrote:Also, any changes to the network settings to allow remote connections have to be followed by a restart of the folding client FAHClient process. If you use paswordless connections on your LAN, you also have enter net addresses where that is allowed.

As for telnet, that works on port 36330 on local net address 127.0.0.1 by default. Until changes are made to allow from a remote address, its port is closed otherwise. You may also need to use another telnet app on your PC, the one supplied with Windows handles character transmission in a way that does not work with FAHClient properly.
The service (and whole computer) were restarted. I tried to add the whole 192.168.1.xxx range to "allowed without password using <commad-allow-no-pass> in the way I pasted to the first post. That's the syntax I found, is it ok? To rule out the Windows telnet program, I tried it from another Ubuntu PC which also doesn't work. I assume the port is actually open as both netstat and lsof show that to be the case.

Re: Problems remote controlling a Linux client (7.5.1)

Posted: Mon Apr 06, 2020 5:54 pm
by Jopj
ipkh wrote:In addition, please check to see if you'll need to add an exception to the linux firewall. Many distributions will block remote access by default.
This was it, thank you! I added a ufw rule for the port which did it. I never ran into this before so somehow forgot that Ubuntu even has a firewall by default :shock: