Changed web ports, now can't login?

IPv4/6, Port, VPN, proxy, SSH, remote access and more.
Locked
User avatar
geoffs
Posts: 12
Joined: 16 Dec 2020, 06:13

Changed web ports, now can't login?

Post by geoffs »

Changed web ports as per the deadbolt notice, now the original ports (8181) are refused and the new ones just timeout?

also android app times out as well
User avatar
geoffs
Posts: 12
Joined: 16 Dec 2020, 06:13

Re: Changed web ports, now can't login?

Post by geoffs »

so I did online chat, got told see this:
viewtopic.php?f=6&t=3031
then told reinstall???
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: Changed web ports, now can't login?

Post by TMSupport »

You can try to use https://IP:5443 to access your device. Then change the Http access port again.
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
geoffs
Posts: 12
Joined: 16 Dec 2020, 06:13

Re: Changed web ports, now can't login?

Post by geoffs »

TMSupport wrote: 02 Mar 2022, 10:46 You can try to use https://IP:5443 to access your device. Then change the Http access port again.
Yeah I tried both changed ports, that's not the issue.

The issue is the OS doesn't realize that a change in IP address should force
a) logoff of web client; and
b) reboot of webserver

regardless now I am on 3rd attempt to get item to reinstall OS
User avatar
kenfrog
Posts: 9
Joined: 21 Oct 2021, 00:48

Re: Changed web ports, now can't login?

Post by kenfrog »

I rebooted the Tnas after I installed TOS 4.2.30-2203011626 and could not get back to the web pages to login
I'm not one to just reinstall so i connected to putty using ssh and my main account
once you connect to the system and login
gain root (be careful here root is god on the system)
then sudo su (enter the password) - you will be in as root like this ([root@TNAS-F5-422 ~]#)
reset the ngnix config using these commands

Code: Select all


service nginx stop
cp /etc.default/nginx/nginx-extend.conf /etc/nginx
cp /etc.default/nginx/nginx-http.conf /etc/nginx
cp /etc.default/nginx/nginx.conf /etc/nginx
Editing the file with VI : vi /etc/nginx/nginx.conf
use insert to add text and change things when you are ready hit esc then

Code: Select all

 
 :wq!                    (write and quit VI command line editor you will see this in the lower left hand corner )
 


hit enter to write out the changed to the config then.

look for the part like this
-=============================-
This is the basic web server listen is the port: change 8181 to your new port
-=============================-

Code: Select all

   #HTTP server
    server {
        listen  8181;
        include nginx-ipv6.conf;
        server_name znasnginx;
        root   /usr/www/;
        index  index.html index.htm index.php;
-=============================-
Moving to the HTTPS PORT - same thing here 5443 can be reset to something new ( notice that ssl on; ) this flags the system to use ssl
-=============================-

Code: Select all

 
    #HTTPS server
    server {
        listen  5443;
        include nginx-ipv6-https.conf;
        server_name     znasnginx;
        root   /usr/www/;
        index  index.html index.htm index.php;

        ssl     on;
        
-=============================-

the problem for me was the line in this config file: vi /etc/nginx/nginx-ipv6-https.conf
[emerg] invalid parameter "ipv6only="
to find this error and correct i used these commands
sudo service nginx restart
nginx -t
-=============================-
This command will test the config you have setup for nginx ( nginx -t )
i kept getting emerg invalid paramter - but looking at the code for the nginx web host you can remove this from the config

vi /etc/nginx/nginx-ipv6-https.conf
-=============================-
My config file looks like this now, one line with the port i want to listen to listen [::]: is the local IP and port has to match the ssl port from above.
-=============================-
listen [::]:5443;
-=============================-

I was able to swap these ports 5443 to the new port i want and http 8181 to the port i want
lastly restart the nginx server
sudo service nginx restart
(you can safely ignore this waning in the test - "nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" using ssl on in the condfig is just an old method to make this work. )
Now the pages load and they are much faster then before :)
Cheers :o
Locked

Return to “Network & Remote Access”