Commit graph

61 commits

Author SHA1 Message Date
GHPS
615c2a41f4
Fix corrupted QR code image in various fonts
(affected fonts include Ubuntu Mono, Mitra Mono, InconsolataGo Nerd Mono)
2021-05-06 16:52:25 +02:00
4s3ti
bccaa1bbee Fix for #1234 & CI/CD Fine-tunning
Changed Exit code from 1 to 0
Added some more checks
Changed order some checks are done
2021-01-28 01:33:03 +01:00
glitch452
be692a8782 Pass along exit code when running a sub-script, instead of always running exit 0 2021-01-23 15:58:03 -05:00
mquirin
6448cc268a
Merge branch 'test' into test 2020-12-26 23:39:48 +00:00
Michael
f3eddccee8 wording and exit code 2020-12-26 23:34:54 +00:00
Orazio
db1fe2ebdd
Merge pull request #1186 from shelleycat485/test
A feature to disable / enable single wireguard client configs
2020-12-24 10:30:25 +01:00
Roger Haxby
ec32851e0c fix clientSTAT.sh error if all clients are disabled 2020-12-15 14:17:05 +00:00
Roger Haxby
86de3eaa8c corect help on disable and enable 2020-12-10 23:59:54 +00:00
Roger Haxby
8bff0b6cb6 clientSTAT shows disabled clients at end 2020-12-10 12:34:49 +00:00
Roger Haxby
a3b7af869c more disabled in brackets 2020-12-09 23:07:28 +00:00
Roger Haxby
6009e52e74 disabled in square brackets 2020-12-08 23:44:51 +00:00
Roger Haxby
49a9314325 change to on/off for temp enable/disable 2020-11-26 15:36:00 +00:00
Orazio
3ed54bf71d Expose AllowedIPs settings inside setupVars.conf 2020-11-14 09:35:51 +01:00
Roger Haxby
13d40399f3 fix listing disabled clients 2020-10-27 21:25:27 +00:00
Roger Haxby
983d43f791 Merge branch 'test' of https://github.com/pivpn/pivpn into test
merging in wg service reload/restart
2020-10-27 20:37:53 +00:00
Orazio
7f1c5ba33c Save debug to /tmp/debug.log for WireGuard too, do not use temporary file to redact IPs in the OpenVPN log. 2020-10-27 12:19:46 +01:00
shelleycat485
a0660979d4 corrent enable help 2020-10-21 23:23:58 +01:00
shelleycat485
9dd67114f8 disable and enable wireguard clients 2020-10-21 22:35:29 +01:00
Orazio
63733b44a5 Reload WireGuard instead of restarting so it doesn't kick existing clients 2020-10-03 10:20:40 +02:00
Orazio
85478aaea0 Disallow integers as client names to avoid ambiguity when removing a client by index. 2020-07-23 14:50:59 +02:00
Orazio
4b239cfdc6
Merge pull request #1087 from gizmocuz/ft-index
Feature: Add Index based option for remove/qr commands
2020-07-23 10:44:15 +02:00
giotto
689b77b73e
lgtm
Co-authored-by: Orazio <orazioedoardo@users.noreply.github.com>
2020-07-19 21:46:18 +02:00
gi8
92f900637e rename param -f|--force to -y|--yes 2020-07-16 15:00:35 +02:00
Rob Peters
960a084866 Better list presentation 2020-07-14 13:27:40 +02:00
giotto
c1dc825ace
add parameter to force remove profile 2020-07-11 21:38:11 +02:00
GizMoCuz
7aa91fc67a Removed middle-dot in print function 2020-07-08 16:36:50 +02:00
GizMoCuz
934aff8871 Add Index for Wireguard remove/qr commands 2020-07-08 15:32:19 +02:00
Orazio
de127173dd Less fragile way to add and remove clients (issue #1050) 2020-06-09 12:25:41 +02:00
Orazio
427c484cac Updated backup scripts for dual VPN 2020-05-29 17:46:04 +02:00
Orazio
823afa3fbb Improved dual VPN uninstallation, remove duplicate code/script
- Allow using 'pivpn vpn -u' to directly uninstall VPN 'vpn'
  - Also allow using 'pivpn -u' with two VPNs (will present a dialog).
  - During uninstall, ask which VPN to remove only if there are two VPNs
  - PiVPN git repo will be downloaded to '/usr/local/src/pivpn'. All scripts
    in /opt/pivpn, the main pivpn script and the bash completion file,
    are now just symbolic links. Resolves issue #695.
  - Remove unused call to updateWireGuard().
2020-05-27 16:36:26 +02:00
Orazio
1dc10e7d54
Merge pull request #1054 from shelleycat485/test
Tidy dual VPN protocol install
2020-05-26 09:55:22 +02:00
shelleycat485
15804dff39 selfcheck checks one VPN type again 2020-05-25 15:24:50 +01:00
Orazio
f06f6d7920 Temporarily disable 'pivpn -up' until a proper update strategy is defined
- 'pivpn -up' pulls the latest scripts from github, however, as of now, its usefulness
    is limited since usually a change in those scripts is a result of a change in the
    installation process, and those changes can't be applied to an older installation.
2020-05-25 10:14:15 +02:00
shelleycat485
b90077bd78 remove refs to /etc/pivpn/setupVars in selfcheck and debug scripts
tidy indenting
  on install, check if symlink already exists before making one to avoid error
  uninstall indicates which vpns are available for uninstall
  selfcheck checks both protocols if both present
  install - additional text in reconfigure saying 2nd protocol can be added
  change to use pivpn ovpn instaed of pivpn opv when dual protocols exist
2020-05-22 12:41:02 +01:00
Orazio
35f07b2147
Merge pull request #1048 from shelleycat485/master
Both wireguard and openvpn can be installed together (Issue #968)
2020-05-19 14:06:58 +02:00
shelleycat485
f6463b8849 uninstall to detect one prot remaining, wg_update removed 2020-05-06 23:00:13 +01:00
shelleycat485
4e3a58702f more dual 2020-05-05 00:05:10 +01:00
root
f379ca2e10 initial dual install try 2020-04-28 23:44:56 +01:00
jellemdekker
bdfb8f4a64 Save pre-shared key to file instead of variable. 2020-04-22 14:12:09 +02:00
jellemdekker
e643acce17 Generate a unique pre-shared key for each client as per WireGuard protocol to improve post-quantum resistance. 2020-04-21 10:52:35 +02:00
Orazio
6653d4caa3 Show connected clients data rates with dotted decimal notation 2020-03-13 12:03:41 +01:00
Orazio
1352ccf9a3 Avoid IPv6 leak by routing IPv6 through WireGuard
- Since the server is IPv4 only, routing IPv6 through it prevents IPv6
    packets from going outside the tunnel (if the client supports IPv6).
2020-03-10 14:16:23 +01:00
Orazio
0a30365d65 Some changes from pull request 963
- Make sure to install WireGuard only if platform is Raspbian or an x86 Debian/Ubuntu
  - Install WireGuard from bullseye repository instead of unstable
  - Reduced WireGuard package priority to the minimum that allows upgrades
2020-03-04 12:48:14 +01:00
Orazio
9846d3787a Use variables to define VPN ranges instead of hard coding IPs 2020-02-16 09:09:09 +01:00
Orazio
3f616d9254 Implemented feature request from issue #942 (WireGuard) 2020-02-07 18:07:15 +01:00
Orazio
5fd5b6e584 Suggest the user to take a look at the FAQ 2020-02-01 21:04:32 +01:00
Orazio
d691321b3e
Merge test (#929)
* added link to server status dashboard

* Replaced Header with bold instead

* More safeguards, some fixes, standardized some code, WireGuard update script, removed redundant code

  - Add curl as a dependency for those who run the script without 'curl URL | bash'.
  - Use POSIX 'command -v' instead of 'hash'.
  - Check if packages have actually been installed and abort execution if they have not.
  - Fixed issue with getStaticIPv4Settings() that prevented existing network settings
    to be used as static IP settings when running the script unattended with empty
    $IPv4addr and $IPv4gw variables.
  - Exit if processing wireguard-linux-compat fails.
  - Exit if 50unattended-upgrades fails to extract.
  - Exit clientSTAT.sh if the wg0 interface is not available.
  - Moved the Self Check to a single script since dedicated versions were very similar.
  - Add 'pivpn -wg' to update WireGuard for users running Raspbian with armv6l kernel.

* Fixed cosmetic issue with spinner, added missing spinner to some APT commands

* Detect current netmask, validate user input when configuring a static IP

* Inform the user when updating the package cache, which can be slow on some RPis

* Invalidate $IPv4Addr and $IPv4gw when the user claims those settings are not correct

* Restart pihole in the more appropriate restartServices() function

* Improve static IP selection, validate public DNS name of the server
  - Default to 'No' when asking if the RPi has DHCP reservation, considered
    that the user may not be fully aware, furthermore, setting a static IP
    anyways doesn't do harm.
  - Validate existing IPv4 settings (address, gateway, DNS) to avoid filling
    '/etc/dhcpcd.conf' with invalid data.
  - Validate public DNS name of the server inside askPublicIPOrDNS() function

* Check DH parameters, fix 'pivpn -c', improvements when dealing with external repositories
  - Added a basic sanity check to downloaded DH paramenters, which doubles as a
    check for missing .pem file.
  - Fix 'pivpn -c' showing the month number instead of the day of the month when
    using WireGuard.
  - Removing APT keys is risky, it would break APT update/upgrade if the user
    already was already using the unstable repo.
  - Replaced 'Checking for $i... installed' in favor of a more clear 'Checking for
    $i... already installed'.
  - Check whether the OpenVPN repo and the Debian unstable repo are already used.

* Improvements to getStaticIPv4Settings()

  - Use a regular expression to extract IPs from the 'ip' command. With this,
    there is a little need to validate output. Even though the regex will match
    invalid IPs like 192.168.23.444, 'ip' can't return them, and even if it did,
    the script would not have reached this function due to previous functions
    using the network with broken routes and addresses.

  - Get the IP address from the selected interface rather then from the 'ip route'
    command as it's not guaranteed that such IP is the same of the interface the
    user decided to use (though on a Raspberry Pi inside a home LAN, most likely
    it is, but it also maskes easier to get the IP in the CIDR notation with a
    single 'ip | grep' pipe).

* Moved command substitution to specific functions to avoid unnecessary execution

  - Moved $availableInterfaces and $CurrentIPv4gw from the script header to
    their relevant function, considered that if the OS is not Raspbian a static
    IP is not set, so those variables are not used.

* Copy files from git repo using the 'install' command, switch DH params from 2ton.com.au to RFC 7919

  - Now using DH parameters suggested by the RFC 7919 for use by TLS servers (the user can
    still generate his own if he wishes).
    https://wiki.mozilla.org/Security/Archive/Server_Side_TLS_4.0#Pre-defined_DHE_groups
2020-01-31 16:40:09 +01:00
Orazio
7841e76d89 Use a fake key as the example, just in case... 2020-01-21 08:29:10 +01:00
4s3ti
dd6bb069f0 Updates and improvements
install.sh
  installScripts function:
    update script not being copied over to /opt therefore update funcion was probably broken.
    changed script to copy all .sh scripts from .pivpn/scripts directory.

Issue #871: fix backup script
  I was probably very drunk when i first wrote this backup script.
  fixed it, now works with new code refactoring,
  loads vars from setupVars
  Added backup for wireguard
  Moved script to global pivpnscripts.
  Added backup script to bash-completion
  Added backup script to pivpn script

update.sh
  Commented the update from master branch to avoid users trying to update test from master.

Updated LatestChages.md
2020-01-08 19:38:38 +01:00
Orazio
41984e5f40 Fix update scripts from test branch 2019-12-30 11:44:33 +01:00