Samba audit app redirects to localhost

NethServer Version: 7.4
Module: Samba audit

My Samba audit runs, it make beautiful log files. But when I want to look at the site it redirects from https://192.168.0.5:980/967a7b3b60c5cddf43b3c5ed9030d2921534cf14 to https://localhost/967a7b3b60c5cddf43b3c5ed9030d2921534cf14 and therefor unreachable for watching.
All the other application from the applications page all stay at https://192.168.0.5 adress.

Hope someone can help, Pit

Does it work from the menu?

The app link directs to the IP used in browser:

grafik

Good question.
From the menu links to https://192.168.0.5:980/en-US/SambaAudit and stay there, no redirect. But at the end it doesn’t work. The browser say: can’t connect to the server at localhost.
Strangely it say “can’t connect to localhost” but the url at top say “https://192.168.0.5:980/en-US/SambaAudit”.

Pit

You mean when you click search?

Is it a proxy message, do you use proxy?

No I don’t use a proxy server in my own lan, even not outside my lan I use a proxy.

Pit

Can you please post me a detailed step-by-step procedure to reproduce the problem?

I can’t see such behavior on my production machine, but I’d like to reproduce it if this is a bug.

Thank you!

I have a modem/router/switch one device (Synology on ip adress 192.168.0.1:7500). It is also my dhcp server.
Then I have a machine without screen or keyboard/mouse. It got 192.168.0.5 as static ip adress. It runs a copy of Nethserver version 7.4.1708 (Final), kernel 3.10.0-693.17.1.el7.x86_64.

I use a workstation with a dynamic ip address 192.168.0.223. I connect to the dashboard using firefox 59.02 for Linux 64 bit. I login as root.

Come in at the dashboard and click in the left pane “Applications”. One of the buttons in the right pane is Samba audit. The others are “Nextcloud”, “PhpMyAdmin”, “Roundcube Webmail” and “Virtual machine manager”.

Hooving over the button of Samba audit, in the left downside of the screen it say “https://192.168.0.5:980/967a7b3b60c5cddf43b3c5ed9030d2921534cf14/”. Clicking on the button it occasionally it go to that address but within 0,5 seconds it change to “https://localhost/967a7b3b60c5cddf43b3c5ed9030d2921534cf14/”. Of course this is the localhost on my workstation and not the server as it has ip address 192.168.0.5.

So something is redirecting the address to localhost, but I can’t find out who is doing this.

I have in /etc/httpd/conf.d/smbaudit.conf

Alias /967a7b3b60c5cddf43b3c5ed9030d2921534cf14 /usr/share/smbaudit

<Directory /usr/share/smbaudit>
AllowOverride none
Options +Indexes
AddType application/x-httpd-php .php .php3
Require local

The number is exactly the same as in /var/lib/nethserver/db/configuration
smb=service|AuditAlias|967a7b3b60c5cddf43b3c5ed9030d2921534cf14|DeadTime|10080|HomeAdmStatus|disabled|InheritOwner|yes|NetbiosAliasList||ShareAdmStatus|disabled|TCPPorts|139,445|UseClientDriver|yes|UseCups|enabled|WinsServerIP||access|green|status|enabled

It is the configuration I got from building up the machine, nothing chanced so far.

Then there is a options in the left pane to access Samba audit direct in the right pane. It points to https://192.168.0.5:980/en-US/SambaAudit If I choose that it end up the same result, the difference is in the address list (top of the browser) it doesn’t chance to localhost but I think in the right pane background it did.

In both cases the browser tells me server not found.

I hope I gave you enough information, do you want more, ask!
Pit

1 Like

Yessssssss! Got it opened. It try to go to “https://192.168.0.5:980/967a7b3b60c5cddf43b3c5ed9030d2921534cf14/” but I chanced the “https://localhost/967a7b3b60c5cddf43b3c5ed9030d2921534cf14/” of in which it redirect to in https://192.168.0.5/967a7b3b60c5cddf43b3c5ed9030d2921534cf14/, so without the port number. And that work. I still don’t know why but it work.

I have made a second machine to try things out. That machine still use the port number and functions…

Pit

I tried to reproduce it both with Firefox and Chrome but without success :frowning:

The only that comes to my mind that something hasn’t been correctly restarted in your machine.
I’m just shooting in the dark, execute from command line:

systemctl restart httpd-admin
systemctl restart httpd