diff --git a/README.md b/README.md index 5c35612..0537be0 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ We will use Libreswan as th ## Author -- Lin Song - Final year Ph.D. candidate seeking opportunities in Software or Systems Engineering. +- Lin Song - Final year U.S. PhD candidate seeking opportunities in Software or Systems Engineering. View my profile on LinkedIn at www.linkedin.com/in/linsongui. - Based on the work of Thomas Sarlandie (sarfata/voodooprivacy). @@ -82,7 +82,7 @@ nano -w vpnsetup_centos.sh /bin/sh vpnsetup_centos.sh ``` -If unable to download via `wget`, you may alternatively open vpnsetup.sh (or vpnsetup_centos.sh) and click the **`Raw`** button. Press `Ctrl+A` to select all, `Ctrl-C` to copy, then paste into your favorite editor. +If unable to download via `wget`, you may alternatively open vpnsetup.sh (or vpnsetup_centos.sh) and click the **`Raw`** button. Press `Ctrl-A` to select all, `Ctrl-C` to copy, then paste into your favorite editor. ## Next Steps @@ -102,9 +102,9 @@ If you wish to create multiple VPN users with different credentials, just Google Public DNS when the VPN is active. To change, set `ms-dns` in `options.xl2tpd`. -For Amazon EC2 instances only: In the security group, open **UDP ports 500 & 4500** and **TCP port 22** (optional, for SSH). +For Amazon EC2 instances only: In the security group, open UDP ports 500 & 4500 and TCP port 22 (optional, for SSH). -If you configured a custom SSH port (not 22) or wish to allow other services, edit IPTables rules before using the scripts. +If you configured a custom SSH port (not 22) or wish to allow other services, edit IPTables rules before using the scripts. The scripts will backup your existing config files before making changes, to the same folder with `.old-date-time` suffix. diff --git a/vpnsetup.sh b/vpnsetup.sh index 55f5ea2..efebe6c 100644 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -26,14 +26,14 @@ IPSEC_PSK='your_ipsec_pre_shared_key' VPN_USER='your_vpn_username' VPN_PASSWORD='your_very_secure_password' -# Be sure to read *important notes* at the URL below: +# Be sure to read IMPORTANT NOTES at the URL below: # https://github.com/hwdsl2/setup-ipsec-vpn#important-notes # ------------------------------------------------------------ if [ "$(uname)" = "Darwin" ]; then echo 'DO NOT run this script on your Mac! It should only be run on a dedicated server / VPS' - echo 'or a newly-created EC2 instance, after you have modified it to set the variables above.' + echo 'or a newly-created EC2 instance, after you have edited the variables above.' exit 1 fi @@ -96,11 +96,11 @@ PRIVATE_IP=$(wget --retry-connrefused -t 3 -T 15 -qO- 'http://169.254.169.254/la # Check IPs for correct format IP_REGEX="^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" if ! printf %s "$PUBLIC_IP" | grep -Eq "$IP_REGEX"; then - echo "Cannot find valid public IP, please edit the script and manually enter." + echo "Cannot find valid public IP. Edit the script and manually enter." exit 1 fi if ! printf %s "$PRIVATE_IP" | grep -Eq "$IP_REGEX"; then - echo "Cannot find valid private IP, please edit the script and manually enter." + echo "Cannot find valid private IP. Edit the script and manually enter." exit 1 fi @@ -142,16 +142,12 @@ cat > /etc/ipsec.conf < /etc/xl2tpd/xl2tpd.conf < /etc/iptables.rules < /etc/iptables.rules < /etc/ipsec.conf < /etc/xl2tpd/xl2tpd.conf < /etc/sysconfig/iptables < /etc/sysconfig/iptables <