mitchellurgero / openrsd

Open Raspberry Pi Server Dashboard
Apache License 2.0
39 stars 13 forks source link

openrsp dashboard Pivpn doesn't show generated keys #44

Closed myhobby2 closed 2 years ago

myhobby2 commented 5 years ago

Running

NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster

Followed the instructions and ovpn keys are being generated but webpage in openrsd does not show these (and can't be downloaded). Default php version is 7.3 with not all modules available yet (it seems).

mitchellurgero commented 5 years ago

I assume you are talking about the ovpn profile configs that are needed for the client's? Pivpn and openrsd need to be installed as the same user for this to work properly. Also, can you provide any logs?

myhobby2 commented 5 years ago

Bit unfamiliar but will do help until analysed....;-)

Execution

Open Openrsd via port 8088

Signin with user pi -> confirmed as user pi

Select PiVPN Profiles in webinterface

Create new profile "github-test"

Response in webinterface below between ""

" Notification : spawn /bin/bash pivpn add nopass root@PiHole:/var/www/openrsd/app# pivpn add nopass Enter a Name for the Client: Github-test How many days should the certificate last? 1080 spawn ./easyrsa build-client-full Github-test nopass

Note: using Easy-RSA configuration from: ./vars

Using SSL: openssl OpenSSL 1.1.1c 28 May 2019

Generating an EC private key

writing new private key to '/etc/openvpn/easy-rsa/pki/private/Github-test.key.pRwX5XBKPc'


Using configuration from /etc/openvpn/easy-rsa/pki/safessl-easyrsa.cnf

Check that the request matches the signature

Signature ok

The Subject's Distinguished Name is as follows

commonName :ASN.1 12:'Github-test'

Certificate is to be certified until Sep 16 14:48:04 2022 GMT (1080 days)

Write out database with 1 new entries

Data Base Updated

Client's cert found: Github-test.crt Client's Private Key found: Github-test.key CA public Key found: ca.crt tls Private Key found: ta.key cat: Default.txt: No such file or directory

======================================================== Done! Github-test.ovpn successfully created! Github-test.ovpn was copied to: /home/pi/ovpns for easy transfer. Please use this profile only on one "

Manual refresh of webpage because no update with create user(s) -> no improvement

Default text on page: "Debug output for troubleshooting (openvpn-status.log, for more logs, go to the Log page.):"

No login in var/log/openvpn*

Created user can be found in /home/pi/ovpns/Github-test.ovpn

Reboot and repeat with new profile generation github-test2

Chech pi on #find -name openvpn-status.log -> Nothing special

Daemon.log

Oct 2 17:05:42 PiHole php[571]: pivpn add nopass Oct 2 17:05:42 PiHole php[571]: root@PiHole:/var/www/openrsd/app# pivpn add nopass Oct 2 17:05:52 PiHole php[571]: Enter a Name for the Client: github-test2 Oct 2 17:05:52 PiHole php[571]: How many days should the certificate last? 1080 Oct 2 17:05:52 PiHole php[571]: spawn ./easyrsa build-client-full github-test2 nopass Oct 2 17:05:52 PiHole php[571]: #015#015 Oct 2 17:05:52 PiHole php[571]: Note: using Easy-RSA configuration from: ./vars Oct 2 17:05:54 PiHole php[571]: #015#015 Oct 2 17:05:54 PiHole php[571]: Using SSL: openssl OpenSSL 1.1.1c 28 May 2019 Oct 2 17:05:54 PiHole php[571]: Generating an EC private key Oct 2 17:05:54 PiHole php[571]: writing new private key to '/etc/openvpn/easy-rsa/pki/private/github-test2.key.Chs2L2UtYz' Oct 2 17:05:54 PiHole php[571]: ----- Oct 2 17:05:54 PiHole php[571]: Using configuration from /etc/openvpn/easy-rsa/pki/safessl-easyrsa.cnf Oct 2 17:05:54 PiHole php[571]: Check that the request matches the signature Oct 2 17:05:54 PiHole php[571]: Signature ok Oct 2 17:05:54 PiHole php[571]: The Subject's Distinguished Name is as follows Oct 2 17:05:54 PiHole php[571]: commonName :ASN.1 12:'github-test2' Oct 2 17:05:54 PiHole php[571]: Certificate is to be certified until Sep 16 15:05:54 2022 GMT (1080 days) Oct 2 17:05:54 PiHole php[571]: #015#015 Oct 2 17:05:54 PiHole php[571]: Write out database with 1 new entries Oct 2 17:05:54 PiHole php[571]: Data Base Updated Oct 2 17:05:54 PiHole php[571]: Client's cert found: github-test2.crt Oct 2 17:05:54 PiHole php[571]: Client's Private Key found: github-test2.key Oct 2 17:05:54 PiHole php[571]: CA public Key found: ca.crt Oct 2 17:05:54 PiHole php[571]: tls Private Key found: ta.key Oct 2 17:05:54 PiHole php[571]: cat: Default.txt: No such file or directory Oct 2 17:05:54 PiHole php[571]: #015 Oct 2 17:05:54 PiHole php[571]: #015 Oct 2 17:05:54 PiHole php[571]: ======================================================== Oct 2 17:05:54 PiHole php[571]: #033[1mDone! github-test2.ovpn successfully created!#033[0m Oct 2 17:05:54 PiHole php[571]: github-test2.ovpn was copied to: Oct 2 17:05:54 PiHole php[571]: /home/pi/ovpns Oct 2 17:05:54 PiHole php[571]: for easy transfer. Please use this profile only on one Oct 2 17:05:54 PiHole php[571]: [Wed Oct 2 17:05:54 2019] PHP Warning: Use of undefined constant r - assumed 'r' (this will throw an Error in a future version of PHP) in /var/www/openrsd/app/profile.php on line 43 Oct 2 17:05:54 PiHole php[571]: [Wed Oct 2 17:05:54 2019] PHP Warning: unlink(./tmp/passwd_054c66f64847715a4a167b7deb915994): Permission denied in /var/www/openrsd/app/profile.php on line 46 Oct 2 17:05:54 PiHole php[571]: [Wed Oct 2 17:05:54 2019] 192.168.1.203:54704 [200]: /app/profile.php Oct 2 17:05:54 PiHole php[571]: [Wed Oct 2 17:05:54 2019] PHP Warning: Invalid argument supplied for foreach() in /var/www/openrsd/pages/openvpn.php on line 34 Oct 2 17:05:54 PiHole php[571]: [Wed Oct 2 17:05:54 2019] 192.168.1.203:54709 [200]: /page.php

Let me know what you need more to analyse.

mitchellurgero commented 5 years ago

Reinstall pivpn under the use "openrsd" see if that helps.

myhobby2 commented 5 years ago

SD card crashed ... reinstalled everything again according your steps...

./install.sh (created by my to install openrsd contains you steps)

_sudo apt install php php-mbstring php-curl php-readline php-xml php-json php-pear lsof git expect geoip-bin shellinabox needrestart sudo mkdir /var/www cd /var/www sudo useradd -r openrsd -d /home/openrsd sudo adduser openrsd sudo sudo mkdir /home/openrsd echo "openrsd ALL=(ALL) NOPASSWD: ALL" | sudo tee --append /etc/sudoers.d/010_openrsd-nopasswd sudo git clone https://github.com/mitchellurgero/openrsd sudo cp openrsd/openrsd.service /etc/systemd/system/openrsd.service sudo systemctl daemon-reload sudo systemctl enable openrsd sudo systemctl start openrsd

Verify openrsd service loaded:

sudo systemctl status openrsd_

Install Pivpn via openrsd

sudo su - openrsd curl -L https://install.pivpn.io | bash

Rebooted and tried to login via :8088/pi-user -> no page updates. Checked the status of openrsd

pi@PiHoleVPN:~ $ systemctl status openrsd ● openrsd.service - OpenRSD Service Loaded: loaded (/etc/systemd/system/openrsd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2019-10-04 16:51:26 CEST; 15h ago Main PID: 579 (php) Tasks: 1 (limit: 1599) Memory: 23.4M CGroup: /system.slice/openrsd.service └─579 /usr/bin/php -S 0.0.0.0:8088

Oct 04 16:55:57 PiHoleVPN php[579]: [Fri Oct  4 16:55:57 2019] 192.168.1.203:61258 [200]: /bower_components/metisMenu/dist/metisMenu.min.js
Oct 04 16:55:57 PiHoleVPN php[579]: [Fri Oct  4 16:55:57 2019] 192.168.1.203:61259 [200]: /bower_components/raphael/raphael-min.js
Oct 04 16:55:57 PiHoleVPN php[579]: [Fri Oct  4 16:55:57 2019] 192.168.1.203:61260 [200]: /bower_components/morrisjs/morris.min.js
Oct 04 16:55:57 PiHoleVPN php[579]: [Fri Oct  4 16:55:57 2019] 192.168.1.203:61261 [200]: /dist/js/sb-admin-2.js
Oct 04 16:55:57 PiHoleVPN php[579]: [Fri Oct  4 16:55:57 2019] PHP Warning:  session_start(): open(/var/lib/php/sessions/sess_of7lde0791c55a42evj2bmsfp3, O_RDWR) failed: Permission denied (13
Oct 04 16:55:57 PiHoleVPN php[579]: [Fri Oct  4 16:55:57 2019] PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/openrsd/page.php on
Oct 04 16:55:57 PiHoleVPN php[579]: [Fri Oct  4 16:55:57 2019] 192.168.1.203:61262 [200]: /page.php
Oct 04 16:56:06 PiHoleVPN php[579]: [Fri Oct  4 16:56:06 2019] PHP Warning:  session_start(): open(/var/lib/php/sessions/sess_of7lde0791c55a42evj2bmsfp3, O_RDWR) failed: Permission denied (13
Oct 04 16:56:06 PiHoleVPN php[579]: [Fri Oct  4 16:56:06 2019] PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/openrsd/page.php on
Oct 04 16:56:06 PiHoleVPN php[579]: [Fri Oct  4 16:56:06 2019] 192.168.1.203:61275 [200]: /page.php

pi@PiHoleVPN:~ $ sudo systemctl restart openrsd pi@PiHoleVPN:~ $ sudo systemctl status openrsd ● openrsd.service - OpenRSD Service Loaded: loaded (/etc/systemd/system/openrsd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2019-10-05 08:40:48 CEST; 37s ago Main PID: 22431 (php) Tasks: 1 (limit: 1599) Memory: 5.2M CGroup: /system.slice/openrsd.service └─22431 /usr/bin/php -S 0.0.0.0:8088

Oct 05 08:40:48 PiHoleVPN systemd[1]: Started OpenRSD Service. pi@PiHoleVPN:~ $ sudo systemctl status openrsd ● openrsd.service - OpenRSD Service Loaded: loaded (/etc/systemd/system/openrsd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2019-10-05 08:40:48 CEST; 2min 56s ago Main PID: 22431 (php) Tasks: 1 (limit: 1599) Memory: 12.7M CGroup: /system.slice/openrsd.service └─22431 /usr/bin/php -S 0.0.0.0:8088

Oct 05 08:43:26 PiHoleVPN sudo[23106]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 05 08:43:26 PiHoleVPN sudo[23106]: pam_unix(sudo:session): session closed for user root
Oct 05 08:43:26 PiHoleVPN php[22431]: [Sat Oct  5 08:43:26 2019] PHP Warning:  Invalid argument supplied for foreach() in /var/www/openrsd/pages/openvpn.php on line 34
Oct 05 08:43:26 PiHoleVPN sudo[23116]:  openrsd : TTY=unknown ; PWD=/var/www/openrsd ; USER=root ; COMMAND=/bin/cat /var/log/openvpn-status.log
Oct 05 08:43:26 PiHoleVPN sudo[23116]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 05 08:43:26 PiHoleVPN sudo[23116]: pam_unix(sudo:session): session closed for user root
Oct 05 08:43:26 PiHoleVPN sudo[23128]:  openrsd : TTY=unknown ; PWD=/var/www/openrsd ; USER=root ; COMMAND=/opt/pivpn/listOVPN.sh
Oct 05 08:43:26 PiHoleVPN sudo[23128]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 05 08:43:26 PiHoleVPN sudo[23128]: pam_unix(sudo:session): session closed for user root
Oct 05 08:43:26 PiHoleVPN php[22431]: [Sat Oct  5 08:43:26 2019] 192.168.1.203:50711 [200]: /page.php

pi@PiHoleVPN:~

Checking /var/log/daemon.log

Oct  5 08:39:07 PiHoleVPN systemd[1]: Starting Clean php session files...
Oct  5 08:39:07 PiHoleVPN systemd[1]: phpsessionclean.service: Succeeded.
Oct  5 08:39:07 PiHoleVPN systemd[1]: Started Clean php session files.
Oct  5 08:39:38 PiHoleVPN systemd[1]: Created slice User Slice of UID 1000.
Oct  5 08:39:38 PiHoleVPN systemd[1]: Starting User Runtime Directory /run/user/1000...
Oct  5 08:39:38 PiHoleVPN systemd[1]: Started User Runtime Directory /run/user/1000.
Oct  5 08:39:38 PiHoleVPN systemd[1]: Starting User Manager for UID 1000...
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Reached target Timers.
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Reached target Paths.
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Listening on GnuPG network certificate management daemon.
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Listening on GnuPG cryptographic agent and passphrase cache.
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Reached target Sockets.
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Reached target Basic System.
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Reached target Default.
Oct  5 08:39:38 PiHoleVPN systemd[22315]: Startup finished in 116ms.
Oct  5 08:39:38 PiHoleVPN systemd[1]: Started User Manager for UID 1000.
Oct  5 08:39:38 PiHoleVPN systemd[1]: Started Session c6 of user pi.
Oct  5 08:40:48 PiHoleVPN systemd[1]: Stopping OpenRSD Service...
Oct  5 08:40:48 PiHoleVPN systemd[1]: openrsd.service: Main process exited, code=killed, status=15/TERM
Oct  5 08:40:48 PiHoleVPN systemd[1]: openrsd.service: Succeeded.
Oct  5 08:40:48 PiHoleVPN systemd[1]: Stopped OpenRSD Service.
Oct  5 08:40:48 PiHoleVPN systemd[1]: Started OpenRSD Service.
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50539 [200]: /
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50542 [200]: /bower_components/bootstrap/dist/css/bootstrap.min.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50543 [200]: /css/bootstrap-material-design.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50544 [200]: /css/ripples.min.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50545 [200]: /bower_components/metisMenu/dist/metisMenu.min.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50546 [200]: /dist/css/timeline.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50547 [200]: /dist/css/sb-admin-2.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50548 [200]: /bower_components/morrisjs/morris.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50549 [200]: /css/custom.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50550 [200]: /bower_components/font-awesome/css/font-awesome.min.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50551 [200]: /css/sign-in.css
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50552 [200]: /app/functions-orsd.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50553 [200]: /img/serveimage.png
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50554 [200]: /bower_components/jquery/dist/jquery.min.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50555 [200]: /bower_components/bootstrap/dist/js/bootstrap.min.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50556 [200]: /js/material.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50557 [200]: /bower_components/metisMenu/dist/metisMenu.min.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50558 [200]: /bower_components/raphael/raphael-min.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50559 [200]: /bower_components/morrisjs/morris.min.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50560 [200]: /js/morris-data.js
Oct  5 08:41:55 PiHoleVPN php[22431]: [Sat Oct  5 08:41:55 2019] 192.168.1.203:50561 [200]: /dist/js/sb-admin-2.js
Oct  5 08:41:56 PiHoleVPN php[22431]: [Sat Oct  5 08:41:56 2019] 192.168.1.203:50562 [404]: /favicon.ico - No such file or directory
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] PHP Warning:  touch(): Unable to create file app/auth_log/10-05-2019.log because Permission denied in /var/www/openrsd/app/auth.php on line 14
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50565 [200]: /index.php
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50566 [200]: /bower_components/bootstrap/dist/css/bootstrap.min.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50567 [200]: /css/bootstrap-material-design.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50568 [200]: /css/ripples.min.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50569 [200]: /bower_components/metisMenu/dist/metisMenu.min.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50570 [200]: /dist/css/timeline.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50571 [200]: /dist/css/sb-admin-2.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50572 [200]: /bower_components/morrisjs/morris.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50573 [200]: /css/custom.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50574 [200]: /bower_components/font-awesome/css/font-awesome.min.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50575 [200]: /css/sign-in.css
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50576 [200]: /app/functions-orsd.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50577 [200]: /bower_components/jquery/dist/jquery.min.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50578 [200]: /bower_components/bootstrap/dist/js/bootstrap.min.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50579 [200]: /js/material.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50580 [200]: /bower_components/metisMenu/dist/metisMenu.min.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50581 [200]: /bower_components/raphael/raphael-min.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50582 [200]: /bower_components/morrisjs/morris.min.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50583 [200]: /dist/js/sb-admin-2.js
Oct  5 08:42:03 PiHoleVPN php[22431]: [Sat Oct  5 08:42:03 2019] 192.168.1.203:50584 [200]: /bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0
Oct  5 08:42:06 PiHoleVPN php[22431]: error: could not lock config file .git/config: Permission denied
Oct  5 08:42:06 PiHoleVPN php[22431]: error: Unable to write upstream branch configuration
Oct  5 08:42:06 PiHoleVPN php[22431]: hint:
Oct  5 08:42:06 PiHoleVPN php[22431]: hint: After fixing the error cause you may try to fix up
Oct  5 08:42:06 PiHoleVPN php[22431]: hint: the remote tracking information by invoking
Oct  5 08:42:06 PiHoleVPN php[22431]: hint: "git branch --set-upstream-to=origin/master".
Oct  5 08:42:06 PiHoleVPN php[22431]: error: cannot open .git/FETCH_HEAD: Permission denied
Oct  5 08:42:06 PiHoleVPN php[22431]: [Sat Oct  5 08:42:06 2019] 192.168.1.203:50585 [200]: /page.php
Oct  5 08:42:08 PiHoleVPN php[22431]: [Sat Oct  5 08:42:08 2019] PHP Warning:  Invalid argument supplied for foreach() in /var/www/openrsd/pages/openvpn.php on line 34
Oct  5 08:42:08 PiHoleVPN php[22431]: [Sat Oct  5 08:42:08 2019] 192.168.1.203:50587 [200]: /page.php
Oct  5 08:42:27 PiHoleVPN php[22431]: [Sat Oct  5 08:42:27 2019] PHP Notice:  Undefined variable: cmd in /var/www/openrsd/app/profile.php on line 27
Oct  5 08:42:27 PiHoleVPN php[22431]: spawn /bin/bash
Oct  5 08:42:27 PiHoleVPN php[22431]: pivpn add nopass
Oct  5 08:42:27 PiHoleVPN php[22431]: root@PiHoleVPN:/var/www/openrsd/app# pivpn add nopass
Oct  5 08:42:27 PiHoleVPN php[22431]: ::: Create a client ovpn profile, optional nopass
Oct  5 08:42:27 PiHoleVPN php[22431]: :::
Oct  5 08:42:27 PiHoleVPN php[22431]: ::: Usage: pivpn <-a|add> [-n|--name <arg>] [-p|--password <arg>]|[nopass] [-d|--days <number>] [-b|--bitwarden] [-i|--iOS] [-h|--help]
Oct  5 08:42:27 PiHoleVPN php[22431]: :::
Oct  5 08:42:27 PiHoleVPN php[22431]: ::: Commands:
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  [none]               Interactive mode
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  nopass               Create a client without a password
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  -n,--name            Name for the Client (default: 'PiHoleVPN')
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  -p,--password        Password for the Client (no default)
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  -d,--days            Expire the certificate after specified number of days (default: 1080)
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  -b,--bitwarden       Create and save a client through Bitwarden
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  -i,--iOS             Generate a certificate that leverages iOS keychain
Oct  5 08:42:27 PiHoleVPN php[22431]: :::  -h,--help            Show this help dialog
Oct  5 08:42:27 PiHoleVPN php[22431]: #015
Oct  5 08:42:37 PiHoleVPN php[22431]: Enter a Name for the Client:  Github
Oct  5 08:42:37 PiHoleVPN php[22431]: How many days should the certificate last?  1080
Oct  5 08:42:37 PiHoleVPN php[22431]: spawn ./easyrsa build-client-full Github nopass
Oct  5 08:42:37 PiHoleVPN php[22431]: #015#015
Oct  5 08:42:37 PiHoleVPN php[22431]: Note: using Easy-RSA configuration from: ./vars
Oct  5 08:42:37 PiHoleVPN php[22431]: #015#015
Oct  5 08:42:37 PiHoleVPN php[22431]: Using SSL: openssl OpenSSL 1.1.1d  10 Sep 2019
Oct  5 08:42:38 PiHoleVPN php[22431]: Generating an EC private key
Oct  5 08:42:38 PiHoleVPN php[22431]: writing new private key to '/etc/openvpn/easy-rsa/pki/private/Github.key.y3KIqgUs6r'
Oct  5 08:42:38 PiHoleVPN php[22431]: -----
Oct  5 08:42:38 PiHoleVPN php[22431]: Using configuration from /etc/openvpn/easy-rsa/pki/safessl-easyrsa.cnf
Oct  5 08:42:38 PiHoleVPN php[22431]: Check that the request matches the signature
Oct  5 08:42:38 PiHoleVPN php[22431]: Signature ok
Oct  5 08:42:38 PiHoleVPN php[22431]: The Subject's Distinguished Name is as follows
Oct  5 08:42:38 PiHoleVPN php[22431]: commonName            :ASN.1 12:'Github'
Oct  5 08:42:38 PiHoleVPN php[22431]: Certificate is to be certified until Sep 19 06:42:38 2022 GMT (1080 days)
Oct  5 08:42:38 PiHoleVPN php[22431]: #015#015
Oct  5 08:42:38 PiHoleVPN php[22431]: Write out database with 1 new entries
Oct  5 08:42:38 PiHoleVPN php[22431]: Data Base Updated
Oct  5 08:42:38 PiHoleVPN php[22431]: Client's cert found: Github.crt
Oct  5 08:42:38 PiHoleVPN php[22431]: Client's Private Key found: Github.key
Oct  5 08:42:38 PiHoleVPN php[22431]: CA public Key found: ca.crt
Oct  5 08:42:38 PiHoleVPN php[22431]: tls Private Key found: ta.key
Oct  5 08:42:38 PiHoleVPN php[22431]: #015
Oct  5 08:42:38 PiHoleVPN php[22431]: #015
Oct  5 08:42:38 PiHoleVPN php[22431]: ========================================================
Oct  5 08:42:38 PiHoleVPN php[22431]: #033[1mDone! Github.ovpn successfully created!#033[0m
Oct  5 08:42:38 PiHoleVPN php[22431]: Github.ovpn was copied to:
Oct  5 08:42:38 PiHoleVPN php[22431]:   /home/pi/ovpns
Oct  5 08:42:38 PiHoleVPN php[22431]: for easy transfer. Please use this profile only on one
Oct  5 08:42:38 PiHoleVPN php[22431]: device and create additional profiles for other devices.
Oct  5 08:42:38 PiHoleVPN php[22431]: ========================================================
Oct  5 08:42:38 PiHoleVPN php[22431]: #015
Oct  5 08:42:38 PiHoleVPN php[22431]: [Sat Oct  5 08:42:38 2019] PHP Warning:  Use of undefined constant r - assumed 'r' (this will throw an Error in a future version of PHP) in /var/www/openrsd/app/profile.php on line 43
Oct  5 08:42:38 PiHoleVPN php[22431]: [Sat Oct  5 08:42:38 2019] PHP Warning:  unlink(./tmp/passwd_fbd2cdb446cdbd5ebf438a045815bb7a): Permission denied in /var/www/openrsd/app/profile.php on line 46
Oct  5 08:42:38 PiHoleVPN php[22431]: [Sat Oct  5 08:42:38 2019] 192.168.1.203:50593 [200]: /app/profile.php
Oct  5 08:42:38 PiHoleVPN php[22431]: [Sat Oct  5 08:42:38 2019] PHP Warning:  Invalid argument supplied for foreach() in /var/www/openrsd/pages/openvpn.php on line 34
Oct  5 08:42:38 PiHoleVPN php[22431]: [Sat Oct  5 08:42:38 2019] 192.168.1.203:50601 [200]: /page.php
Oct  5 08:42:56 PiHoleVPN php[22431]: [Sat Oct  5 08:42:56 2019] PHP Warning:  Invalid argument supplied for foreach() in /var/www/openrsd/pages/openvpn.php on line 34
Oct  5 08:42:56 PiHoleVPN php[22431]: [Sat Oct  5 08:42:56 2019] 192.168.1.203:50613 [200]: /page.php
Oct  5 08:43:10 PiHoleVPN php[22431]: [Sat Oct  5 08:43:10 2019] 192.168.1.203:50654 [200]: /index.php
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50655 [200]: /bower_components/bootstrap/dist/css/bootstrap.min.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50656 [200]: /css/bootstrap-material-design.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50657 [200]: /css/ripples.min.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50658 [200]: /bower_components/metisMenu/dist/metisMenu.min.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50659 [200]: /dist/css/timeline.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50660 [200]: /dist/css/sb-admin-2.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50662 [200]: /bower_components/morrisjs/morris.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50663 [200]: /css/custom.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50664 [200]: /bower_components/font-awesome/css/font-awesome.min.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50665 [200]: /css/sign-in.css
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50666 [200]: /app/functions-orsd.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50667 [200]: /bower_components/jquery/dist/jquery.min.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50668 [200]: /img/serveimage.png
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50669 [200]: /bower_components/bootstrap/dist/js/bootstrap.min.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50670 [200]: /js/material.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50671 [200]: /bower_components/metisMenu/dist/metisMenu.min.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50672 [200]: /bower_components/raphael/raphael-min.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50673 [200]: /bower_components/morrisjs/morris.min.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50674 [200]: /js/morris-data.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50675 [200]: /dist/js/sb-admin-2.js
Oct  5 08:43:11 PiHoleVPN php[22431]: [Sat Oct  5 08:43:11 2019] 192.168.1.203:50676 [404]: /favicon.ico - No such file or directory
Oct  5 08:43:19 PiHoleVPN php[22431]: [Sat Oct  5 08:43:19 2019] PHP Warning:  touch(): Unable to create file app/auth_log/10-05-2019.log because Permission denied in /var/www/openrsd/app/auth.php on line 14
Oct  5 08:43:19 PiHoleVPN php[22431]: [Sat Oct  5 08:43:19 2019] 192.168.1.203:50686 [200]: /index.php
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50688 [200]: /bower_components/bootstrap/dist/css/bootstrap.min.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50689 [200]: /css/bootstrap-material-design.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50690 [200]: /css/ripples.min.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50691 [200]: /bower_components/metisMenu/dist/metisMenu.min.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50692 [200]: /dist/css/timeline.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50693 [200]: /dist/css/sb-admin-2.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50694 [200]: /bower_components/morrisjs/morris.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50695 [200]: /css/custom.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50696 [200]: /bower_components/font-awesome/css/font-awesome.min.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50697 [200]: /css/sign-in.css
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50698 [200]: /app/functions-orsd.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50699 [200]: /bower_components/jquery/dist/jquery.min.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50700 [200]: /bower_components/bootstrap/dist/js/bootstrap.min.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50701 [200]: /js/material.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50702 [200]: /bower_components/metisMenu/dist/metisMenu.min.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50703 [200]: /bower_components/raphael/raphael-min.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50704 [200]: /bower_components/morrisjs/morris.min.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50705 [200]: /dist/js/sb-admin-2.js
Oct  5 08:43:20 PiHoleVPN php[22431]: [Sat Oct  5 08:43:20 2019] 192.168.1.203:50706 [200]: /bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0
Oct  5 08:43:23 PiHoleVPN php[22431]: error: could not lock config file .git/config: Permission denied
Oct  5 08:43:23 PiHoleVPN php[22431]: error: Unable to write upstream branch configuration
Oct  5 08:43:23 PiHoleVPN php[22431]: hint:
Oct  5 08:43:23 PiHoleVPN php[22431]: hint: After fixing the error cause you may try to fix up
Oct  5 08:43:23 PiHoleVPN php[22431]: hint: the remote tracking information by invoking
Oct  5 08:43:23 PiHoleVPN php[22431]: hint: "git branch --set-upstream-to=origin/master".
Oct  5 08:43:23 PiHoleVPN php[22431]: error: cannot open .git/FETCH_HEAD: Permission denied
Oct  5 08:43:23 PiHoleVPN php[22431]: [Sat Oct  5 08:43:23 2019] 192.168.1.203:50707 [200]: /page.php
Oct  5 08:43:26 PiHoleVPN php[22431]: [Sat Oct  5 08:43:26 2019] PHP Warning:  Invalid argument supplied for foreach() in /var/www/openrsd/pages/openvpn.php on line 34
Oct  5 08:43:26 PiHoleVPN php[22431]: [Sat Oct  5 08:43:26 2019] 192.168.1.203:50711 [200]: /page.php
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: bits received from HRNG source: 540064
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: bits sent to kernel pool: 484608
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: entropy added to kernel pool: 484608
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS 140-2 successes: 27
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS 140-2 failures: 0
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS 140-2(2001-10-10) Monobit: 0
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS 140-2(2001-10-10) Poker: 0
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS 140-2(2001-10-10) Runs: 0
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS 140-2(2001-10-10) Long run: 0
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS 140-2(2001-10-10) Continuous run: 0
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: HRNG source speed: (min=221.227; avg=495.762; max=555.370)Kibits/s
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: FIPS tests speed: (min=4.699; avg=11.746; max=12.590)Mibits/s
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: Lowest ready-buffers level: 2
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: Entropy starvations: 0
Oct  5 08:51:13 PiHoleVPN rngd[385]: stats: Time spent starving for entropy: (min=0; avg=0.000; max=0)us
Oct  5 08:51:24 PiHoleVPN systemd[1]: Created slice User Slice of UID 0.
Oct  5 08:51:24 PiHoleVPN systemd[1]: Starting User Runtime Directory /run/user/0...
Oct  5 08:51:24 PiHoleVPN systemd[1]: Started User Runtime Directory /run/user/0.
Oct  5 08:51:24 PiHoleVPN systemd[1]: Starting User Manager for UID 0...
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Reached target Paths.
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Reached target Timers.
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Listening on GnuPG cryptographic agent and passphrase cache.
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Listening on GnuPG network certificate management daemon.
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Reached target Sockets.
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Reached target Basic System.
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Reached target Default.
Oct  5 08:51:24 PiHoleVPN systemd[23598]: Startup finished in 111ms.
Oct  5 08:51:24 PiHoleVPN systemd[1]: Started User Manager for UID 0.
Oct  5 08:51:24 PiHoleVPN systemd[1]: Started Session c7 of user root.

Summary:

mitchellurgero commented 5 years ago

Can you modify your comment and put the logs in a code block?

mitchellurgero commented 5 years ago

Yes, copy your log text, and put into a code block

https://help.github.com/en/articles/creating-and-highlighting-code-blocks

myhobby2 commented 5 years ago

At your service ;-)

mitchellurgero commented 5 years ago

Looks like a bunch of permissions issues there. Please verify the webserver can actually modify files in /home/pi and where you installed openrsd.

myhobby2 commented 5 years ago

Will check again. Thnx and I will you informed

myhobby2 commented 5 years ago

Did install a 2nd pi with only openrsd and PiVpn, because that is the config I like. It feels that the script I use is not compliant with OS buster. Can that be confirmed ? (Certain Php modules seems to be not available in the default raspian buster image.

Meanwhile I should consider using a Pi3 which is able to do the job..... nevertheless I don't mind to make this project work on buster . Below the steps that I executed with user pi.. and was not able to logon via port 8088. I can with user root btw and than create vpn-profiles which don't show up in the web interface.

image

mitchellurgero commented 5 years ago

Do you have a Telegram or Matrix account so we can work together on this in realtime this weekend?

myhobby2 commented 5 years ago

I don't have both but there are many other options like joining a zerotier network created by you which I join, skype, teamviewer, whatsapp, facetime .... You can use the Pi4 via zerortier as your own Pi for 1-2 weeks to work things out. I can provide help with clean images if needed.

mitchellurgero commented 5 years ago

I am looking to get access to your RPi so I can try and resolve this issue by hand. Is this something you are comfortable with?

myhobby2 commented 4 years ago

Yes, no problem. Zerotier is than the best option... Full access on a network you created. I will join the network for you so you have access. Will supplier or reset the passwords also. Let me know what is the next step

myhobby2 commented 4 years ago

Let me know if you plan something. Help is appreciated btw

mitchellurgero commented 4 years ago

Sorry I've been at work and it's been busy, but drop me an email info@urgero.org and we can work something out.