Zertifikatproblem mit Raspberry Pi3 und Nextcloud

Viperino

Komplett-PC-Aufrüster(in)
Hallo, ich habe ein Problem und hoffe ihr könnt mir helfen.
Ich habe eine Nextcloud für ein Projekt mit einem Raspberry Pi3 aufgesetzt. Installiert sind:

Raspbian Stretch
Nextcloud
PHP7
Apache2
MySQL
PHPmyAdmin

Lokal läuft alles super. Teil des Projekts ist die Erreichbarkeit von außen, das hat ja eine Cloud an sich. Dafür muss man ja DynDNS einrichten, 443 und 80 auf dem Router freischalten und ein Zertifikat installieren.
Diese Punkte habe ich wie in dieser Anleitung gemacht:
Die eigene Cloud mit dem Raspberry Pi und Nextcloud - canox.net

Jetzt das Problem:

Wenn ich die erstellte Adresse suche, erscheint dieses Fenster:

Dropbox - 6.JPG

Wenn man man dann auf Hinzufügen klickt, passiert nichts mehr und es kommt ein Connection Fehler.

Auf spdns gibt es im Account eine Warnung. Keine Ahnung ob das was bedeutet:

Dropbox - spdns warnung.png

Wäre nett wenn mir jemand helfen würde :)
 
Hast du denn dein LetsEncrypt Zertifikat erstellt und eingetragen?

Alles auf SSL umgestellt?

Ports am Router richtig konfiguriert?

Über welche Adresse willst du denn zugreifen?
Feste Domain oder DynDns?


PS
Die Fehlermeldung ist doch ziemlich eindeutig?!
 
Hast du denn dein LetsEncrypt Zertifikat erstellt und eingetragen?

Alles auf SSL umgestellt?

Ports am Router richtig konfiguriert?

Über welche Adresse willst du denn zugreifen?
Feste Domain oder DynDns?


PS
Die Fehlermeldung ist doch ziemlich eindeutig?!

Deine 5 Fragen werden doch in meinem Anfangspost beantwortet.
 
Es gibt einen Punkt namens "trusted Domains" in der Config.php der Owncloud/Nextcloud Installation.
Wenn du dort den Extern erreichbaren DNS-Namen(DYN-DNS Namen) einträgst, sollte eigentlich alles funktionieren.

Hab jetzt auf die schnelle nur die Doku für Owncloud gefunden, sollte aber immernoch ähnlich wenn nicht sogar gleich sein.
Durchsuch die Seite einfach nach trusted_domains und du wirst direkt fündig . :D

Config.php Parameters — ownCloud 9.0 Server Administration Manual 9.0 documentation
 
Es gibt einen Punkt namens "trusted Domains" in der Config.php der Owncloud/Nextcloud Installation.
Wenn du dort den Extern erreichbaren DNS-Namen(DYN-DNS Namen) einträgst, sollte eigentlich alles funktionieren.

Hab jetzt auf die schnelle nur die Doku für Owncloud gefunden, sollte aber immernoch ähnlich wenn nicht sogar gleich sein.
Durchsuch die Seite einfach nach trusted_domains und du wirst direkt fündig . :D


Config.php Parameters — ownCloud 9.0 Server Administration Manual 9.0 documentation

Vielen Dank, ich versuche das gleich nach der Schule.
 
Irgendwie komme ich nicht weiter. Nun habe ich alles was mit spdns (spdyn), letsencrypt und certbot zu tun hat entfernt, damit ich einen frischen start machen kann.

DynDNS habe ich jetzt mit no-ip versucht hinzubekommen und nach dieser Anleitung:
Raspberry Pi: DynDNS einrichten | Einplatinencomputer

Es scheint zu klappen, da ich auf der No-IP Seite die IP abfragen kann.

Dann habe ich versucht ein Zertifikat zu erstellen, und dies nach dieser Anleitung:
Let’s Encrypt: Kostenloses SSL/TLS Zertifikat erstellen › Jan Karres

Jetzt hänge ich bei Step 4 fest, da folgendes passiert ist:

Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 38 of /etc/apache2/sites-enabled/000-default-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory


How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Apache Web Server plugin - Beta (apache) [Misconfigured]
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
-------------------------------------------------------------------------------
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 3

Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel):*******@freenet.de

-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: a

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: n
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.********.ddns.net
http-01 challenge for ********.ddns.net

Select the webroot for www.******.ddns.net:
-------------------------------------------------------------------------------
1: Enter a new webroot
-------------------------------------------------------------------------------
Press 1 [enter] to confirm the selection (press 'c' to cancel): 1
Input the webroot for www.******.ddns.net: (Enter 'c' to cancel):/var/www/nextcloud/

Select the webroot for ******.ddns.net:
-------------------------------------------------------------------------------
1: Enter a new webroot
2: /var/www/nextcloud
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Ich senke der Webroot den ich eingegeben habe ist richtig, oder?

Waiting for verification...
Cleaning up challenges
Failed authorization procedure. www.******.ddns.net (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: DNS problem: NXDOMAIN looking up A for www.******.ddns.net, ******.ddns.net (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to ******.ddns.net

IMPORTANT NOTES:
- The following errors were reported by the server:

Domain: www.******.ddns.net
Type: connection
Detail: DNS problem: NXDOMAIN looking up A for
www.******.ddns.net

Domain: ******d.ddns.net
Type: connection
Detail: Could not connect to ******.ddns.net

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
root@raspberrypi:/opt/letsencrypt#


Aber eigentlich müsste ich ja auch ohne Zertifikat auf meine Cloud zugreifen können, oder? Das klappt auch nicht, obwohl in der Fritzbox Port 80 und 443 frei sind für den Pi.
 
Bist du sicher dass du das Zertifikat erstellt hast?

Wichtiger noch: sicher dass ein offener Webserver das richtige in deinen Händen ist?

Apache muss aus sein, wenn du das Cert anforderst und einträgst.

In die sites-enabled trägst du die dyndns Adressen, Ports und Verzeichnisse ein.

Also wo in var/www/ oder var/www/html sich welche Seite befindet.

Lokal solltest du auf cloud zugreifen können, extern nur wenn die virtuellen Hosts in der sites-enabled korrekt eingetragen sind.

Hast du sites-enabled auch aktiviert?



Ausserdem werden dir oben diverse Schreibfehler in 3 configs angezeigt.


Mein Tipp, lass es sein.


Scann mal kurzzeitig was alles an Anfragen auf offene Ports geballert wird.
Ein Fehler, Standarduser und Pw oder irgendwas und du bist Teil eines Botnetzes.
 
Ok, habe apache2 geschrottet. Danach jedoch komplett gelöscht, neu installiert und Seite in "trustet domains" eingetragen.
Jetzt komme ich endlich rauf, jedoch ohne SSL. Wenigstens....

var/www habe ich geändert.

In "/etc/apache2/sites-available/000-default.conf" habe ich var/www/html zu nextcloud geändert, darunter das eingefügt:

Alias /phpmyadmin “/usr/share/phpordner/“
<Directory “/usr/share/phpordner/“>
Order allow,deny
Allow from all
Require all granted
</Directory>

und ganz am Ende das:

<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
</Directory>

Es dient nur morgen für die Schule als Livetest, danach kommt alles weg.
 
So, habe alles hinbekommen. SSL und Port 443 waren in den Apacheconfigs nicht drin sowie paar Pfade für die Zertifikate.
Zertifikat geht jetzt auch.

Und ja, www.******.ddns.net geht nicht, da ich die Seite ohne www registriert habe.

Danke für die Hilfe :)
 
Zurück