Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
prosody [24.12.2015 21:09] – [Konfiguration] x1lent | prosody [25.12.2015 11:13] (aktuell) – [Konfiguration] x1lent | ||
---|---|---|---|
Zeile 2: | Zeile 2: | ||
* Installation auf ffpi-services | * Installation auf ffpi-services | ||
- | * Wird unter xmpp.ffpi oder xmpp.pinneberg.freifunk.net erreichbar | + | * Ist unter xmpp.ffpi oder xmpp.pinneberg.freifunk.net erreichbar |
===== Warum Prosody? ===== | ===== Warum Prosody? ===== | ||
- | Sicher fragt man sich warum wir kein ejabberd nutzen. Dies ist schlicht und ergreifend eigenen Präferenz. Ich persöhnlich | + | Sicher fragt man sich warum wir kein ejabberd nutzen. Dies ist schlicht und ergreifend eigenen Präferenz. Ich persönlich |
===== Installation ===== | ===== Installation ===== | ||
Zeile 24: | Zeile 24: | ||
< | < | ||
apt-get update | apt-get update | ||
- | apt-get install prosody lua-sec | + | apt-get install prosody lua-sec |
</ | </ | ||
- | Sollte die Version von lua-sec aus dem offiziellen Package Repos < 5.0 sein solltet ihr anstatt | + | Sollte die Version von lua-sec aus dem offiziellen Package Repos < 5.0 sein solltet ihr anstelle |
===== Modifikation ===== | ===== Modifikation ===== | ||
- | Da es nur Clients aus dem FFPI Netz erlaubt werden soll einen Account beim XMPP Server zu erstellen | + | Da es nur Clients aus dem FFPI Netz erlaubt werden soll einen Account beim XMPP Server zu erstellen |
- | + | ||
- | <file lua / | + | |
- | + | ||
- | [...] | + | |
- | local blacklisted_ips = module: | + | |
- | local whitelist_ip_starts_with = module: | + | |
- | local register_hosts = module: | + | |
- | --IP Check for FFPI -- | + | |
- | function checkIP(ipadress, | + | |
- | for i, ipstart in ipairs(whitelist_start) do | + | |
- | if string.sub(ipadress, | + | |
- | return true | + | |
- | end | + | |
- | | + | |
- | | + | |
- | end | + | |
- | + | ||
- | [...] | + | |
- | + | ||
- | elseif blacklisted_ips[session.ip] or (whitelist_only and not whitelisted_ips[session.ip]) then | + | |
- | module: | + | |
- | if (whitelist_only and not checkIP(session.ip, | + | |
- | session.send(st.error_reply(stanza, | + | |
- | return true; | + | |
- | end | + | |
- | [...] | + | |
- | + | ||
- | else | + | |
- | -- TODO unable to write file, file may be locked, etc, what's the correct error? | + | |
- | local error_reply = st.error_reply(stanza, | + | |
- | + | ||
- | for i, reg_host | + | |
- | module: | + | |
- | if usermanager_create_user(username, | + | |
- | if next(data) and not account_details: | + | |
- | usermanager_delete_user(username, | + | |
- | session.send(error_reply); | + | |
- | return true; | + | |
- | end | + | |
- | session.send(st.reply(stanza)); | + | |
- | module: | + | |
- | module: | + | |
- | username = username, reg_host = reg_host, source = " | + | |
- | session = session }); | + | |
- | else | + | |
- | session.send(error_reply); | + | |
- | end | + | |
- | end | + | |
- | [...] | + | |
- | </ | + | |
+ | < | ||
+ | cd / | ||
+ | apt-get install git | ||
+ | git clone https:// | ||
+ | </ | ||
===== Konfiguration ===== | ===== Konfiguration ===== | ||
Zeile 90: | Zeile 45: | ||
openssl dhparam -out / | openssl dhparam -out / | ||
</ | </ | ||
- | Dies kann einige Zeit dauern. In der zwischenzeit | + | Dies kann einige Zeit dauern. In der Zwischenzeit |
< | < | ||
Zeile 99: | Zeile 54: | ||
</ | </ | ||
- | Nun geht es an die eigentliche | + | Nun geht es an die eigentliche |
<file lua / | <file lua / | ||
Zeile 151: | Zeile 106: | ||
-- These are commented by default as they have a performance impact | -- These are commented by default as they have a performance impact | ||
--" | --" | ||
- | | + | " |
-- Nice to have | -- Nice to have | ||
Zeile 363: | Zeile 318: | ||
===== Abschluss ===== | ===== Abschluss ===== | ||
- | Anschließend | + | Abschließend |
service prosody restart | service prosody restart | ||