Https redirect locks the Webgui

daquirm3

Cadet
Joined
Aug 17, 2020
Messages
7
Hi,

I’ve set up Freenas to redirect automatically from Http to https through webgui, but from now on my webgui is not accessible, how can I revert this setting?
freenas.local 11.3-RELEASE-p9

Best regards
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
From the shell, run midclt call system.general.update "ui_httpsredirect":false.
 

daquirm3

Cadet
Joined
Aug 17, 2020
Messages
7
Thanks for reply Samuel, it didn‘t go as expected:
Code:
root@freenas:~ # midclt call system.general.update "ui_httpsredirect":false
[general_settings] A dict was expected
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 130, in call_method
    io_thread=False)
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1084, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.7/site-packages/middlewared/service.py", line 301, in update
    f'{self._config.namespace}.update', self, self.do_update, [data]
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1084, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 960, in nf
    args, kwargs = clean_and_validate_args(args, kwargs)
  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 918, in clean_and_validate_args
    value = attr.clean(args[args_index + i])
  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 583, in clean
    raise Error(self.name, 'A dict was expected')
middlewared.schema.Error: [general_settings] A dict was expected
 

daquirm3

Cadet
Joined
Aug 17, 2020
Messages
7
It still redirects, but it doesn’t work...
 

Attachments

  • 602CD787-1715-4E7B-BFEE-AF02F4A3DFF4.jpg
    602CD787-1715-4E7B-BFEE-AF02F4A3DFF4.jpg
    17 KB · Views: 268

catherineva11e

Dabbler
Joined
Jan 13, 2018
Messages
19
Is that iOS? do you access to a non apple device? Apple security changed how it handles HSTS (http strict transport security).
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Apologies, you'll have to do this via the REST API. Run this from shell: curl --basic -u root -k -X PUT "https://<your FreeNAS IP>/api/v2.0/system/general" -H "accept: */*" -H "Content-Type: application/json" -d '{"ui_httpsredirect":false}'. I verified this works on my own system.
 

daquirm3

Cadet
Joined
Aug 17, 2020
Messages
7
Thank you for help, the problem is indeed with iOS device only, I tried to access it through Firefox/Ubuntu and the Webgui is accessible again. As I use ipad exclusively to manage everything now, it‘s kind of pitty, that FreeNAS doesn’t work with that. The API call works well, I guess service nginx restart is needed to apply the changes?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
I guess service nginx restart is needed to apply the changes?

No, the API call hooks the FreeNAS middleware, which automatically restarts the HTTP and django services after applying this change.
 
Top