Page 1 of 1

Web Control 401 HTTP UNAUTHORIZED

Posted: Tue Mar 31, 2020 10:51 am
by MrSandman
I've joined F@H a couple weeks ago. I run client on my old gaming PC, which I only have remote access to. Every time I want to shut it down, I have to RDP and pause folding. I know there is a Web Control, so naturally I want to use that instead, but when I try to access it, I get 401 HTTP UNAUTHORIZED.

I found this guide, but it wasn't exactly useful:
https: linustechtips{dot}com /main/topic/990176-howto-remotely-access-your-folding-systems-part-1-fahcontrol/

Let's say my LAN setup is router on a.b.c.1, old PC on a.b.c.2 and new PC on a.b.c.3. These are related config.xml settings:

Code: Select all

  <!-- HTTP Server -->
  <allow v='127.0.0.1 a.b.c.2 a.b.c.3'/>

  <!-- Remote Command Server -->
  <command-allow-no-pass v='127.0.0.1 a.b.c.2 a.b.c.3'/>
This is the log of me trying to access Web Control (http: a.b.c.2:7396) from a.b.c.3 and a.b.c.2:

Code: Select all

09:30:08:9:a.b.c.3 GET /
09:30:08:WARNING:9:a.b.c.3:401 HTTP UNAUTHORIZED /
09:31:55:10:a.b.c.2 GET /
09:31:55:WARNING:10:a.b.c.2:401 HTTP UNAUTHORIZED /
While if I access it as http: localhost:7396 on a.b.c.2:

Code: Select all

09:32:00:12:127.0.0.1 GET /
09:32:01:13:127.0.0.1 GET /css/normalize.css
09:32:01:14:127.0.0.1 GET /css/main.css
...
I tried using ',' and ', ' to separate allowed IPs, tried /24, tried restarting the client and the PC after these changes, but it does not work.

So, basically Web Control works only on localhost. It does listen on a.b.c.2, but replies with 401, even though <allow> directive clearly says to allow access to the IPs I try to access it from. Even more, if I put these into <deny>, it does deny:

Code: Select all

09:32:35:WARNING:Denied 4:a.b.c.3 access to URI: /
This brings me to the question: how am I supposed to "authorize" to access Web Control? Why I'm not required to do so when I access it via http: localhost:7396, but suddenly have to on http: a.b.c.2:7396, even though both 127.0.0.1 and a.b.c.2 are in the <allow> list (and are, in fact, the same machine)? Maybe my configuration misses something?

Re: Web Control 401 HTTP UNAUTHORIZED

Posted: Tue Mar 31, 2020 3:54 pm
by MrSandman
<web-allow>, not <allow>

Re: Web Control 401 HTTP UNAUTHORIZED

Posted: Tue Mar 31, 2020 8:06 pm
by Joe_H
Web Control was never designed to be used remotely, there have been some hacks posted on how to set it up, but I understand it can be a bit cranky. Don't have any links handy to post at the moment.

The FAHControl app was designed to do this, and works better. To do so from outside your LAN may take a bit more setup, but can be done.

In either case, any time changes are made to the network configurations in FAHClient, it has to be restarted for them to take effect.