change port 80 to port 8080 problem

Nas-dude

Dabbler
Joined
Jul 27, 2019
Messages
17
i want to access my nas from outside the internet, but i have something else on port 80, so i want to change it to port 8080

i tried editing using vi the file nginx.conf using this command

vi /etc/local/nginx/nginx.conf


i edited using vi the following part to 8080

server_name localhost;
listen 0.0.0:8080;
listen [::]:8080;


then to save the file, i typed "etc" ":" "wq" "enter"

which gave the message that it saved,

but when i reboot, the nginx.conf file goes back to 80

does anyone know what's going on?


help! thanks
 
Last edited:

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
does anyone know what's going on?

Did you see this?

Code:
Welcome to FreeNAS

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.


i want to access my nas from outside the internet

Are you sure? You want to access the server GUI from the internet? Not sure what purpose would serve and it is not a good idea, but you will need to provide your FreeNAS version so people can guide you or you can try to find it under system > General > Web GUI http port. If you are natting 8080 to the server IP, why not NAT a different port to 80 for that IP? It will at least not use one of the default ports.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Stop! FreeNAS isn’t hardened for this!

One thing I've learned from my kids: No one experience is good enough. They have to experience themselves. We are tired to say that it is not a good idea to expose your server to the internet, but every other day I see people asking.

Expose the GUI? For what? There is no purpose of doing that, unless you want to remotely manage users and other configurations. If you are on a situation that you need to do that, implement VPN/jump box/etc; If you want to access your files, implement NC/OC - don't NAT SMB ports to the internet; and the list goes on.

But again, I told my kids not to do lots of stuff ...
 

Nas-dude

Dabbler
Joined
Jul 27, 2019
Messages
17
Did you see this?

Code:
Welcome to FreeNAS

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.

Are you sure? You want to access the server GUI from the internet? Not sure what purpose would serve and it is not a good idea, but you will need to provide your FreeNAS version so people can guide you or you can try to find it under system > General > Web GUI http port. If you are natting 8080 to the server IP, why not NAT a different port to 80 for that IP? It will at least not use one of the default ports.


no i didn't see it,
so that means i will have to ftp into the server and manually download/upload the nginx.conf file?
or will it also reset on reboot?



i thought the server gui was the only way to access/view your storage/files
is freenas made only for internal networks? and not outside networks?

i am using 11.2-U5

thank you! your directions worked!
General > Web GUI http port

i can now access it 8080, that was easy


i am using 80 for a website, so i can't change that one,
i am using freenas for testing purposes and transfer files to my other desktop and doesn't need to be up 24.7



Stop! FreeNAS isn’t hardened for this!

why isn't it hardened? is there security issues with the software? im going to use a very difficult password,

thanks for the warning, im using it for testing and other purposes, il keep my eye on my network for strange activity,
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
so that means i will have to ftp into the server and manually download/upload the nginx.conf file?

No, it means what is written. Any changes done via shell will be lost on reboot. Only changes via GUI are saved to the database and will survive reboots.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
why isn't it hardened? is there security issues with the software? im going to use a very difficult password
If there is an exploit the password “difficulty” won’t matter.

It’s not hardened because that costs resources and public access to the management UI isn’t a use case.
i thought the server gui was the only way to access/view your storage/files
No, file access isn’t handled by the management UI.
i am using 80 for a website, so i can't change that one
Your network is NAT’ed so what port a specific resource use isn’t important, your external port can be anything and be routed to port 80 on FreeNAS.
is freenas made only for internal networks?
Yes (substitute “internal” with “secure”), but you can run services exposed to other networks.
 
Top