Problems remote controlling a Linux client (7.5.1)

If you're new to FAH and need help getting started or you have very basic questions, start here.

Moderators: Site Moderators, FAHC Science Team

Post Reply
Jopj
Posts: 3
Joined: Mon Apr 06, 2020 12:06 pm

Problems remote controlling a Linux client (7.5.1)

Post 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.
regchan
Posts: 26
Joined: Fri Apr 03, 2020 2:59 am

Re: Problems remote controlling a Linux client (7.5.1)

Post 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
Joe_H
Site Admin
Posts: 7937
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: Problems remote controlling a Linux client (7.5.1)

Post 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.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
ipkh
Posts: 173
Joined: Thu Jul 16, 2015 2:03 pm

Re: Problems remote controlling a Linux client (7.5.1)

Post 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.
Jopj
Posts: 3
Joined: Mon Apr 06, 2020 12:06 pm

Re: Problems remote controlling a Linux client (7.5.1)

Post 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.
Jopj
Posts: 3
Joined: Mon Apr 06, 2020 12:06 pm

Re: Problems remote controlling a Linux client (7.5.1)

Post 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:
Post Reply