Unifi angeblich keine Webseite vorhanden

Hallo Forum,

ich habe die Unifi Wlan Lösung von Netzint an zwei Schulen installiert. Bei beiden wird das Loginportal für Schüler verwendet.

An einer Schule habe ich nun das Problem dass auf die Webseite umgeleitet wird. Es kommt aber die Rückmeldung dass da keine Webseite sei.

Der Vergleich mit der Schule an der es funktioniert bringt keinen Unterschied zu Tage. Der Apache auf dem Unifi Controler läuft.

Hat wer eine Idee wonach ich suchen könnte?

Gruß

Alois

Hallo Alois!

Vergleiche mal den Inhalt/Dateien unter

/usr/lib/unifi/data/sites/portal

Hier der Inhalt der Doku:

Portal Customization

With Portal Customization, the UniFi Controller software allows complete branding of a
portal implementation, allowing admins to white label the wireless Internet service as if
it were developed completely by the business. In order to provide the greatest degree of
flexibility in branding the company/individual, the UniFi Controller software provides total
access to the portal directory on the system in which it is installed. This open architecture
allows administrators to include unlimited content while keeping development simple
through the use of plain .html (hand code or use any text editor).
After enabling Portal Customization under the Guest Portal settings, the Controller creates
a file structure that can be easily accessed and navigated, found at /<unifi_base>/data/
sites/<site_name>/portal.
Among the files contained in the portal directory, the most important ones are outlined
below:

  • index.html – Main landing page that displays pricing, authentication information and
    Terms of Use to the guest.
  • payment.html – Used to submit credit card information. It requires HTTPS and also
    serves as an example of an additional .html page.
  • fail.html – Displayed when there is an error handling a guest login.
  • reset-min.css – Standardizes the rendering of HTML elements across browsers.
  • styles.css – Controls the style of HTML elements.

Located in the bundle folder are the following files:

  • bundle/messages.properties – This file defines package costs, duration of access,
    package titles, and how the charge will appear on a customer’s credit card account.
    Error messages are also defined by this file and can be edited in most text editors.
  • bundle/vouchers.css – Standardizes the rendering of HTML elements across browsers.
  • vouchers.html – The default appearance of vouchers belonging to a site.

Testing is simple and immediate; simply save code on the Controller PC, reload the guest
browser and see changes reflected on Guest Portal pages. All HTML pages are rendered
and can be the target of a form’s POST action. None of the supporting files are required
(e.g., styles, css), although using the files provided by Ubiquiti, network administrators
have complete control to customize the Guest Portal experience for the end-user.
Moreover, multiple hotspot packages can be configured for different payment types,
names, duration of use, bandwidth limits, etc.

Btw: https://www.deepl.com/translate kennst Du das schon?

Beste Grüße

Thorsten

Hallo Thorsten,

vielen Dank!

Die Übersetzung liest sich wie ein chinesisches Handbuch :slight_smile:

Unter dem Pfad

/usr/lib/unifi/data/sites/portal

finde ich bei beiden Controlern kein /portal

Bei der Netzint-Lösung liegt das Portal hier:

/var/www/guest/s/default

Dort habe ich alles verglichen (Dateien und Rechte). Ich finde keinen Unterschied.

Es laufen auf beiden Controlern sechs Apache-Prozesse

root@unifi:/home/unifi# ps -A|grep apache
1251 ? 00:00:01 apache2
4409 ? 00:00:00 apache2
4410 ? 00:00:00 apache2
4411 ? 00:00:00 apache2
4412 ? 00:00:00 apache2
4413 ? 00:00:00 apache2

Es ist also eigentlich alles wie es soll. Nur auf einem bekomme ich die Login-Seite nicht :frowning: .

Gruß

Alois

Hi Alois,

versuch doch mal auf den Webserver zu browsen IP/guest/s/defaultl. Was kommt dann? Hier sollte ein “forbidden” oder ähnlich kommen.

VG; Maurice

Hallo Maurice,

auf dem Controller ausgeführt kommt das:

root@unifi:/home/unifi# wget 172.16.16.253/guest/s/default/
–2017-11-07 17:15:52-- http://172.16.16.253/guest/s/default/
Connecting to 172.16.16.253:80… connected.
HTTP request sent, awaiting response… 302 Found
Location: /guest/s/default/login.php? [following]
–2017-11-07 17:15:52-- http://172.16.16.253/guest/s/default/login.php?
Reusing existing connection to 172.16.16.253:80.
HTTP request sent, awaiting response… 302 Found
Location: [following]
–2017-11-07 17:15:52-- http://172.16.16.253/guest/s/default/login.php?
Reusing existing connection to 172.16.16.253:80.
HTTP request sent, awaiting response… 302 Found
Location: [following]
exit
unifi@unifi:~$ exit
logout
Connection to 10.16.1.3 closed.

Auf dem Ipfire ausgeführt kommt:

[root@ipfire ~]# wget 172.16.16.253/guest/s/default/
–2017-11-07 17:17:01-- http://172.16.16.253/guest/s/default/
Connecting to 172.16.16.253:80… failed: Connection timed out.
Retrying.

–2017-11-07 17:17:17-- (try: 2) http://172.16.16.253/guest/s/default/
Connecting to 172.16.16.253:80… failed: Connection timed out.
Retrying.

Das wiederholt sich offenbar unendlich.

Gruß

Alois

Hallo,

ich habe den Fehler vermutlich gefunden. Es fehlte die Datei “terms.html”. Ein aptitude reinstall behob den Fehler. Allerdings konnte ich noch nicht vor Ort überprüfen obs jetzt funktioniert.

Gruß

Alois

Hallo,

leider ist das Problem noch nicht behoben. Man wird auf diese Seite umgeleitet

http://172.16.16.253/guest/s/default/login.php?id=81:59:f9:dc:a1:1d&ap=80:2a:a8:c0:2b:bc&t=1510327286&url=http://www.web.de%2F&ssid=WlanEk

und dort kommt die Mitteilung:

Die Webseite unter - siehe oben - konnte nicht geladen werden weil: net:ERR_ADRESS_UNREACHABLE

Hat wer noch Ideen was da falsch sein könnte?

Gruß und Danke

Alois

Hallo,

möglicheweise ist die Usache zu wenig Ram. In der Schule ist alles Xen virtualisiert. Es waren für den UNIFI-Controller 512 MB vogesehen. Bei der Suche nach dem Grund für das nicht funktionieren bin ich unter

/var/log/unifi

auf Fehlermeldungen gestoßen die nach dem Erhöhen des Speichers verschwunden sind.

Ob damit auch das eigentliche Problem behoben ist erfahre ich morgen.

Gruß

Alois

Immer noch der gleiche Fehler.

Gruß Alois

Hi Alois,

ist der Unifi-Controller in der Ausnahme liste?

Lege doch mal eine test html Datei unter /var/www/guest/s/default/ ab. z.B test.html:

<html>
<body>
<h1>Das ist eint test</h1>
</body>
</html>

Kannst du diese via http://172.16.16.253/guest/s/default/test.html aufrufen?

VG,

Maurice

Hallo Maurice,

Wo finde ich die?

Gruß

Alois

Hallo Maurice,

das habe ich gemacht und werde morgen testen.

Gruß

Alois

Hallo Maurice,

ist damit die allowed_ports gemeint?

Gruß

Alois

Hallo Maurice,

vom IPFIRE ausgeführt

[root@ipfire ~]# wget 172.16.16.253/guest/s/default/test.html
–2017-11-13 18:02:05-- http://172.16.16.253/guest/s/default/test.html
Connecting to 172.16.16.253:80… failed: Connection timed out.

gehts nicht.

Vom Server gehts

18:07/130 server ~ # wget 10.16.1.3/guest/s/default/test.html
–2017-11-13 18:08:01-- http://10.16.1.3/guest/s/default/test.html
Verbindungsaufbau zu 10.16.1.3:80… verbunden.
HTTP-Anforderung gesendet, warte auf Antwort… 200 OK
Länge: 56 [text/html]
In »»test.html«« speichern.

100%[=======================================================================================================>] 56 --.-K/s in 0s

2017-11-13 18:08:01 (9,38 MB/s) - »»test.html«« gespeichert [56/56]

Gruß

Alois

Hi Alois,

schau mal in die Guest Control > Access Control > Pre Authorization Access > /32

VG,

Maurice

Hallo Maurice,

dort sind zwei Netze eingetragen

172.16.16.253/16

und

10.16.0.0/12

Gruß

Alois

Hallo Maurice,

ich kann die test.html nicht aufrufen :frowning:

Gruß

Alois

Hallo,

eben habe ich festgestellt, dass die Netzmaske unter 172.16.16.253 falsch war. Statt 255.255.0.0 stand da 255.255.255.0.

Ich gehe davon aus, dass damit das Problem behoben ist.

Seltsamerweise hat es schon mal funktioniert.

Gruß

Alois

Hallo,

nach einer kleinen Korrektur heute funktioniert es.

Gruß

Alois