Commit Graph

199 Commits

Author SHA1 Message Date
hwdsl2
61025818bb Optimize binary size
- Use the gcc "-s" option when compiling Libreswan. This reduces
  binary size by ~80%.
2021-07-10 01:57:11 -05:00
hwdsl2
64eb0e1f49 Cleanup 2021-06-09 00:42:28 -05:00
hwdsl2
811ce6a9aa Update IKEv2 script
- Check certificate status when exporting a client configuration
  using --exportclient
2021-06-01 23:35:19 -05:00
hwdsl2
ea52ab4683 Update IKEv2 script
- New: Revoke a client certificate using the helper script. Users can
  also manually revoke a client certificate, see https://git.io/ikev2
- Check for certificate validity when exporting client configurations
- Delete CRL from IPsec database when removing IKEv2
- Cleanup
2021-06-01 02:30:51 -05:00
hwdsl2
3014143e15 Update IKEv2 script
- Advanced users can specify the server's IP address using variable
  VPN_PUBLIC_IP instead of auto-detect
2021-05-11 09:59:29 -05:00
hwdsl2
ee409250d8 Improve IKEv2 setup
- Increase RSA key size from the default 2048 bits to 3072 bits
- Use fixed delay between certutil calls, a random delay is not needed
- Update docs
2021-05-01 14:46:12 -05:00
hwdsl2
e850fca9c3 Update IKEv2 script
- Remove MODP1024 from IKEv2 ciphers for improved security. Windows users
  will need to make a one-time registry change before connecting for the
  first time. Refer to https://git.io/ikev2.
2021-04-24 22:34:48 -05:00
hwdsl2
ac0bde54bb New Libreswan version
- Use new Libreswan version 4.4
- Support updating to Libreswan 4.4
- Other small improvements and cleanup
2021-04-24 16:15:05 -05:00
hwdsl2
d90c6121b6 Improve OS detection 2021-04-20 00:09:00 -05:00
hwdsl2
10f09bbab6 Cleanup 2021-04-18 14:27:52 -05:00
hwdsl2
f35ea9ed0d Update IKEv2 script
- Improve output for auto mode when custom options are specified
2021-04-11 13:53:38 -05:00
hwdsl2
5076f9ec03 Update IKEv2 script
- Add an option to specify the name of the first IKEv2 client when
  running the script in auto mode. The default is "vpnclient".
- Cleanup
2021-04-10 16:24:49 -05:00
hwdsl2
804856064b Minor fix and cleanup
- Minor fix for CentOS 8 for the uncommon scenario where the server has
  "nftables" service enabled
- Cleanup
2021-04-01 23:06:36 -05:00
hwdsl2
7ac343db4d Update IKEv2 script
- Improve output
2021-03-30 23:47:59 -05:00
hwdsl2
e6c2cbcd96 Update IKEv2 script 2021-03-28 23:39:04 -05:00
hwdsl2
cd3a0c1bed Update IKEv2 script
- Remove support for Libreswan 3.22 and older in the IKEv2 script. Users
  should update to a newer version before setting up IKEv2.
- Cleanup
2021-03-19 23:58:06 -05:00
hwdsl2
eb8daa3a40 Update helper scripts
- Cleanup and minor improvements to the helper scripts for managing
  VPN users
2021-03-12 00:07:48 -06:00
hwdsl2
35c85526b6 Update IKEv2 script
- Minor improvement to client config message
2021-03-08 23:23:00 -06:00
hwdsl2
d54b2ac57a Cleanup 2021-03-07 23:38:38 -06:00
hwdsl2
8fa3bfac80 Cleanup 2021-03-07 00:12:46 -06:00
hwdsl2
1abcd704be Update IKEv2 config
- Use the AES_GCM128 cipher for improved performance
  Ref: https://libreswan.org/wiki/Benchmarking_and_Performance_testing
- Update docs
2021-03-06 14:07:07 -06:00
hwdsl2
11f8502e3a Improve IKEv2 setup
- Use default key size (2048 bits) when generating key pairs using
  certutil. This significantly reduces IKEv2 setup time on servers
  with less powerful CPUs, such as Raspberry Pis, while still providing
  sufficient security.
- Update docs
2021-03-05 21:33:41 -06:00
hwdsl2
2e7b3f1bf4 Update IKEv2 script
- Make it easier for users to update Libreswan when the script is not
  running in auto mode
2021-02-26 00:42:02 -06:00
hwdsl2
1972501725 New Libreswan version
- Use new Libreswan version 4.3
- Support updating to Libreswan 4.3
- Other small improvements
- Update tests
2021-02-21 23:54:37 -06:00
hwdsl2
70e8acc0e7 Update IKEv2 script
- Cleanup
2021-02-18 00:43:55 -06:00
hwdsl2
52151ffdfe Cleanup 2021-02-14 01:20:17 -06:00
hwdsl2
4deb437562 Fix permissions
- Set the executable bit for .sh files. Ref: #910. Thanks @reuixiy!
2021-02-13 14:40:48 -06:00
hwdsl2
7982ddf763 Update IKEv2 script
- Minor fix: When used inside a Docker container, do not restart the
  IPsec service if it is not currently running.
2021-02-12 01:08:49 -06:00
hwdsl2
256b7e5063 Update IKEv2 script
- Add variables VPN_DNS_SRV1 and VPN_DNS_SRV2, for specifying custom DNS
  servers when running the IKEv2 script in auto mode. Example:
  VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash ikev2.sh --auto
2021-02-10 01:19:17 -06:00
hwdsl2
c83148245b Update IKEv2 script
- Add a variable VPN_DNS_NAME, which can be defined when running the
  IKEv2 script in auto mode, to set up IKEv2 using a DNS name instead
  of an IP address for the VPN server. The DNS name must be a fully
  qualified domain name (FQDN). Example:
  VPN_DNS_NAME=vpn.example.com bash ikev2.sh --auto
- Minor cleanup
2021-02-09 22:32:26 -06:00
hwdsl2
5779b2e6c8 Improve output
- Improve output for the VPN setup and upgrade scripts. The outputs
  of the scripts are now significantly reduced and only include the
  most useful information for users.
- Other minor cleanup
2021-02-05 21:49:35 -06:00
hwdsl2
89eaacc0b8 Update IKEv2 script
- Improve output and clean up
2021-02-04 23:41:48 -06:00
hwdsl2
1808095bb7 New Libreswan version
- Use new Libreswan version 4.2
- Support updating to Libreswan 4.2 from older versions. The upgrade
  scripts can now install one of these versions: 3.32, 4.1 or 4.2.
- Other small improvements
- Update tests
2021-02-04 01:47:04 -06:00
hwdsl2
5510e1f9d2 Update IKEv2 script
- Remove date/time suffix from client config file names
2021-02-03 21:35:56 -06:00
hwdsl2
4d1af3afcb Update IKEv2 script
- Add an option to list the names of existing IKEv2 clients
2021-02-01 22:38:42 -06:00
hwdsl2
954b2acb7c Fix for IKEv2
- Fix an issue where multiple IKEv2 clients behind the same NAT cannot
  connect simultaneously to the VPN server. Note that before this fix,
  this issue only occurs when using an IP address (instead of a DNS name)
  for IKEv2 for the VPN server.
- This issue is found to be related to Libreswan's matching of local IDs
  when checking connections. A local ID with '@' prefix has type ID_FQDN,
  which does not match the ID_IPV4_ADDR type that the peer expects. This
  prevents connection switching from working correctly for the scenario
  above. Removing the prefix fixed the issue.
- Fixes #924
2021-02-01 21:42:31 -06:00
hwdsl2
a44c1ea473 Update IKEv2 script
- Improvement: If the script is run using sudo, export the VPN client
  config files to the user's home directory instead of "/root", and set
  owner/group so that users can more easily download the config files.
2021-01-30 14:24:01 -06:00
hwdsl2
08d0ca372e Update IKEv2 script
- Add a command-line option to remove IKEv2
- Change the error to a warning when option '--auto' is specified after
  IKEv2 setup
- Other minor improvements
2021-01-25 22:32:32 -06:00
hwdsl2
8c286df143 Cleanup 2021-01-24 20:01:40 -06:00
hwdsl2
7e3a38ca54 Update IKEv2 script
- New: Users can now specify '--listclients' to list the names of
  existing IKEv2 clients
- Other minor improvements
2021-01-24 15:54:44 -06:00
hwdsl2
625ddd3d32 Update IKEv2 script
- New: Users can now specify '--addclient [client name]' or
  '--exportclient [client name]' command-line arguments to automatically
  add or export an IKEv2 client using default options.
- Show script usage when '-h' or '--help' is specified.
- Other minor improvements
2021-01-24 13:53:55 -06:00
hwdsl2
83d7309147 Cleanup 2021-01-23 18:20:49 -06:00
hwdsl2
f0c1f3bcb1 Update IKEv2 script
- New: Create .sswan files to simplify Android IKEv2 client setup and
  improve VPN performance
- Cleanup
2021-01-23 16:02:59 -06:00
hwdsl2
3611ed5981 Update IKEv2 script
- Minor fix: Set permission for the generated .mobileconfig file to 600,
  same as the exported .p12 file.
2021-01-23 00:20:09 -06:00
hwdsl2
47b5cd01c1 Update IKEv2 script
- For the Ubuntu 18.04 NSS bug fix, use mirrors.kernel.org, which
  is an Ubuntu mirror that supports HTTPS, instead of HTTP-only
  security.ubuntu.com
- Minor fix: When uninstalling IKEv2, delete keys in addition to
  certificates from the IPsec database
2021-01-21 23:07:24 -06:00
hwdsl2
5e1b3e1ae9 Update IKEv2 script
- Apply fix for NSS bug on Ubuntu 18.04. Ubuntu 18.04 has NSS (libnss3)
  version 3.35, which has a bug with iteration counts that results in
  "incorrect password" errors when trying to import a generated ".p12"
  file to Windows. To fix this, we install newer versions of libnss3
  related packages from the official Ubuntu repo.
  Ref: #414
  https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.36.1_release_notes
  https://packages.ubuntu.com/focal/amd64/libnss3
- Other minor improvements
2021-01-21 00:24:07 -06:00
hwdsl2
7d9f2c6603 Fix IKEv2
- Fix an issue with IKEv2 disconnecting after one hour due to IKE SA
  expiration, by setting ikelifetime and salifetime to 24h.
  Ref: #913 #844 https://libreswan.org/man/ipsec.conf.5.html
2021-01-20 01:39:07 -06:00
hwdsl2
9bf2b630ca Update IKEv2 script
- Add option to remove IKEv2
2021-01-19 01:05:06 -06:00
hwdsl2
819ff8a2b3 Update IKEv2 script
- New feature: Export configuration for an existing IKEv2 client
- If IKEv2 has already been set up, users can now choose from a menu to
  either add a new client or export configuration for an existing client
2021-01-18 21:57:09 -06:00
hwdsl2
ef93a9867b Update IKEv2 script
- New feature: The IKEv2 helper script can now be run in "auto mode",
  which sets up IKEv2 using default options, no user input needed.
  To use this mode, add command-line parameter "--auto"
- Refactor entire script to remove duplicate code, improve structure
  and make it easier to read and maintain
- Add check for Libreswan version
- Update tests
2021-01-18 00:01:46 -06:00