HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.32k stars 2.26k forks source link

listen on port 80 #1501

Open random404-bot opened 6 years ago

random404-bot commented 6 years ago

Step 1: Please describe your environment

Step 2: Describe the problem:

I want to install zeronet on an nas asustor i can install it without problem but it cant listen port 80 and dont accede to the webui because there is no web browser on the nas

rllola commented 6 years ago

If you want to access it from your computer you need first the ip address of your nas.

Also your Zeronet UI is not on port 80 but on port 43110. You can read it on this line :

[21:27:43] Ui.UiServer --------------------------------------
[21:27:43] Ui.UiServer Web interface: http://127.0.0.1:43110/
[21:27:43] Ui.UiServer --------------------------------------
filips123 commented 6 years ago

Is it possible to change port of web interface?

rllola commented 6 years ago

Yes you can.

You can either specify it when starting zeronet using, like this :

python zeronet.py --ui_port 80

Or in zeronet.conf file

[global]
ui_port=80

Also @alex37330 if you are connecting from another ip address you might want to allow others ip to access it by adding ui_ip=0.0.0.0 (it will allow every ip to connect maybe not the best).

You can also find more information on the conf file in the doc : https://zeronet.readthedocs.io/en/latest/faq/

ghost commented 5 years ago

Binding to ports <1024 typically requires running the app with root privileges, which is not recommended.

You should run ZN as a non-privileged user and setup either a reverse proxy or an iptables port-translation from port 80 -> ZN:43110 (i.e. iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:43110)

edit to make the ports consistent