sarz4fun
(Andrea)
September 21, 2024, 5:59am
1
Hello, After upgrade to nethsec 8-23.05.4-ns.1.2.0-55-g072b34ea9, web interface has a redirect to luci instead of nethsec ui.
Luci is disabled on my installation, and i can’t open the ui (404 error)
URL was https://firewall:9090/cgi-bin/luci instead https://firewall:9090/
Revert to previous snapshot (44) solved the problem.
2 Likes
giacomo
(Giacomo Sanchietti)
September 23, 2024, 6:57am
2
Thank you for reporting.
This could be a regression due to a fix for this issue: Unable to disable legacy LuCI UI after system upgrade · Issue #760 · NethServer/nethsecurity · GitHub
I can’t reproduce your problem on a clean machine.
Could you please paste the output of the following commands?
Commands:
uci show ns-ui
find /etc/nginx/
/usr/sbin/nginx -T -c /etc/nginx/uci.conf
cat /etc/nginx/uci.conf
sarz4fun
(Andrea)
September 23, 2024, 6:43pm
3
Hello this Is the output of my command. Upgraded from 44 to 59 snapshot.
Only thing i can see that reverse proxy to 192.168.168.8 goes to an offline ip (server offline)
_ _ _ _ _____
| \ | | | | | | / ____|
| \| | ___| |_| |__ | (___ ___ ___
| . ` |/ _ \ __| '_ \ \___ \ / _ \/ __|
| |\ | __/ |_| | | |____) | __/ (__
|_| \_|\___|\__|_| |_|_____/ \___|\___|
root@firewall:~# uci show ns.ui
uci: Entry not found
root@firewall:~# find /etc/nginx/
/etc/nginx/
/etc/nginx/conf.d
/etc/nginx/conf.d/00ns.locations.disabled
/etc/nginx/conf.d/_lan.crt
/etc/nginx/conf.d/_lan.key
/etc/nginx/conf.d/luci.locations.disabled
/etc/nginx/conf.d/ns-ui.conf
/etc/nginx/conf.d/ns_d72b0d9c.proxy
/etc/nginx/conf.d/ns_36e3747b.proxy
/etc/nginx/fastcgi_params
/etc/nginx/koi-utf
/etc/nginx/koi-win
/etc/nginx/mime.types
/etc/nginx/module.d
/etc/nginx/module.d/luci.module
/etc/nginx/restrict_locally
/etc/nginx/scgi_params
/etc/nginx/uci.conf
/etc/nginx/uci.conf.template
/etc/nginx/uwsgi_params
/etc/nginx/win-utf
root@firewall:~# /usr/sbin/nginx -T -c /etc/nginx/uci.conf
nginx: the configuration file /etc/nginx/uci.conf syntax is ok
nginx: configuration file /etc/nginx/uci.conf test is successful
# configuration file /etc/nginx/uci.conf:
# This file is re-created when Nginx starts.
# Consider using UCI or creating files in /etc/nginx/conf.d/ for configuration.
# Parsing UCI configuration is skipped if uci set nginx.global.uci_enable=false
# For details see: https://openwrt.org/docs/guide-user/services/webserver/nginx
# UCI_CONF_VERSION=1.2
worker_processes auto;
user root;
include module.d/*.module;
events {}
http {
access_log off;
log_format openwrt
'$request_method $scheme://$host$request_uri => $status'
' (${body_bytes_sent}B in ${request_time}s) <- $http_referer';
include mime.types;
default_type application/octet-stream;
sendfile on;
client_max_body_size 128M;
gzip on;
gzip_vary on;
gzip_proxied any;
root /www;
server { #see uci show 'nginx._lan'
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _lan;
include conf.d/*.locations;
ssl_certificate /etc/nginx/conf.d/_lan.crt;
ssl_certificate_key /etc/nginx/conf.d/_lan.key;
ssl_session_cache shared:SSL:32k;
ssl_session_timeout 64m;
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
}
server { #see uci show 'nginx.ns_d72b0d9c'
proxy_ssl_verify off;
ssl_session_timeout 64m;
ssl_session_cache shared:SSL:32k;
listen 443 ssl;
listen [::]:443 ssl;
include conf.d/ns_d72b0d9c.proxy;
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
server_name xxxx.xxxx.ddns.net;
ssl_certificate /etc/ssl/acme/xxxxx.xxxxx.ddns.net.fullchain.crt;
ssl_certificate_key /etc/ssl/acme/xxx.xxxx.ddns.net.key;
}
server { #see uci show 'nginx.ns_36e3747b'
proxy_ssl_verify off;
ssl_session_timeout 64m;
ssl_session_cache shared:SSL:32k;
listen 443 ssl;
listen [::]:443 ssl;
include conf.d/ns_36e3747b.proxy;
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
server_name xxxxx.ddns.net;
ssl_certificate /etc/ssl/acme/xxxxx.ddns.net.fullchain.crt;
ssl_certificate_key /etc/ssl/acme/xxxxx.ddns.net.key;
}
include conf.d/*.conf;
}
# configuration file /etc/nginx/module.d/luci.module:
load_module /usr/lib/nginx/modules/ngx_http_ubus_module.so;
# configuration file /etc/nginx/mime.types:
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/avif avif;
image/png png;
image/svg+xml svg svgz;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/webp webp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
font/woff woff;
font/woff2 woff2;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.oasis.opendocument.graphics odg;
application/vnd.oasis.opendocument.presentation odp;
application/vnd.oasis.opendocument.spreadsheet ods;
application/vnd.oasis.opendocument.text odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xlsx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document
docx;
application/vnd.wap.wmlc wmlc;
application/wasm wasm;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
# configuration file /etc/nginx/conf.d/ns_d72b0d9c.proxy:
location / {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host xxxx.xxxxx.ddns.net;
proxy_pass https://192.168.168.8;
}
# configuration file /etc/nginx/conf.d/ns_36e3747b.proxy:
location / {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host xxxxxx.ddns.net;
proxy_pass https://192.168.168.6;
}
# configuration file /etc/nginx/conf.d/ns-ui.conf:
server {
listen 9090 ssl default_server;
listen [::]:9090 ssl default_server;
server_name _lan;
include conf.d/*.locations;
ssl_certificate /etc/nginx/conf.d/_lan.crt;
ssl_certificate_key /etc/nginx/conf.d/_lan.key;
ssl_session_cache shared:SSL:32k;
ssl_session_timeout 64m;
error_log syslog:server=unix:/dev/log;
access_log syslog:server=unix:/dev/log;
}
root@firewall:~# cat /etc/nginx/uci.conf
# This file is re-created when Nginx starts.
# Consider using UCI or creating files in /etc/nginx/conf.d/ for configuration.
# Parsing UCI configuration is skipped if uci set nginx.global.uci_enable=false
# For details see: https://openwrt.org/docs/guide-user/services/webserver/nginx
# UCI_CONF_VERSION=1.2
worker_processes auto;
user root;
include module.d/*.module;
events {}
http {
access_log off;
log_format openwrt
'$request_method $scheme://$host$request_uri => $status'
' (${body_bytes_sent}B in ${request_time}s) <- $http_referer';
include mime.types;
default_type application/octet-stream;
sendfile on;
client_max_body_size 128M;
gzip on;
gzip_vary on;
gzip_proxied any;
root /www;
server { #see uci show 'nginx._lan'
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _lan;
include conf.d/*.locations;
ssl_certificate /etc/nginx/conf.d/_lan.crt;
ssl_certificate_key /etc/nginx/conf.d/_lan.key;
ssl_session_cache shared:SSL:32k;
ssl_session_timeout 64m;
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
}
server { #see uci show 'nginx.ns_d72b0d9c'
proxy_ssl_verify off;
ssl_session_timeout 64m;
ssl_session_cache shared:SSL:32k;
listen 443 ssl;
listen [::]:443 ssl;
include conf.d/ns_d72b0d9c.proxy;
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
server_name xxxx.xxxxx.ddns.net;
ssl_certificate /etc/ssl/acme/xxxxx
Xxxx.ddns.net.fullchain.crt;
ssl_certificate_key /etc/ssl/acme/xxxx.xxxxx.ddns.net.key;
}
server { #see uci show 'nginx.ns_36e3747b'
proxy_ssl_verify off;
ssl_session_timeout 64m;
ssl_session_cache shared:SSL:32k;
listen 443 ssl;
listen [::]:443 ssl;
include conf.d/ns_36e3747b.proxy;
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
server_name xxxxxxx.ddns.net;
ssl_certificate /etc/ssl/acme/xxxxxxx.ddns.net.fullchain.crt;
ssl_certificate_key /etc/ssl/acme/xxxxxx.ddns.net.key;
}
include conf.d/*.conf;
}
giacomo
(Giacomo Sanchietti)
September 24, 2024, 7:05am
4
Sorry, the first command was wrong, the correct one is:
uci show ns-ui
But reading the other output I guess you have nsui_enable
option set to 0
.
It must be set to 1
if you want access on port 443:
uci set ns-ui.config.nsui_enable=1
uci commit ns-ui && ns-ui
sarz4fun
(Andrea)
September 24, 2024, 10:58am
5
Hello, i do not want to access from 443 port but only from 9090.
giacomo
(Giacomo Sanchietti)
September 24, 2024, 12:05pm
6
Ok, I didn’t get it.
The port 9090 is disabled because this file: /etc/nginx/conf.d/00ns.locations.disabled
.
It must be renamed to /etc/nginx/conf.d/00ns.locations
to enable again the port 9090.
Can you please share the output of uci show ns-ui
?
I suspect that nsui_extra_enable
is set to 0.
Edit: I’ve found a case where the issue was present, we are testing a fix.
1 Like
sarz4fun
(Andrea)
September 24, 2024, 6:10pm
7
giacomo:
uci show ns-ui
This on snapshot 44 and 73:
| \ | | | | | | / |
| | | | | | | | ( ___ ___
| . ` |/ _ \ | ’ \ _ \ / _ / |
| |\ | / || | | | __) | / (
| | _|_ |_| | |_| / _ |_ _|
root@firewall:~# uci show ns-ui
ns-ui.config=main
ns-ui.config.luci_enable=‘0’
ns-ui.config.nsui_enable=‘0’
ns-ui.config.nsui_extra_port=‘9090’
ns-ui.config.nsui_extra_enable=‘1’
On snapshot 73 problem Is solved!
On port 443 redirect to luci and shows error 404 but i don’t care about because i want only access from 9090…
1 Like