Scripts

Click on rpi-vpn.zip to download all the scripts in my book.

These scripts are in Windows format (.txt extension) and best used by opening with Notepad, selecting all (Ctrl+A), copy (Ctrl+C), and then pasting (right-mouse click) into the nano editor of the PuTTy window as described in the book.

List of scripts:

Current:

  • check_ip.py.txt – Enhanced
    1.5.0 | Changes required for Python3 in Raspberry Pi OS (Bullseye)
    1.4.0 | Added CPU and Power Supply Monitoring
    1.3.2 | Updated script change in IPvSite URL
    1.3.1 | Bugfix for (-f) forced mapping of ports using MiniUPnPc
    1.3.0 | Multiple Changes for Raspbian Buster Compatibility
    1.2.5 | Added Help Text via -h option
    1.2.3 | Better handling of errors on Retrieving External IP Address
    1.2.2 | Added MiniDelay Global to adjust discoverydelay for slow routers
    1.2.1 | Typo fix in line below from Sketch to Stretch 🙂
    1.2.0 | Added functionality to support Sketch release of Raspbian OS
    1.1.0 | Added ‘-f’ parameter to Force UPnP Remapping and Reboot
    1.0.3 | Not always rebooting when Raspberry PI IP address changed
    1.0.2 | Better pattern matching on IP address updating
    1.0.1 | Complete rewrite of original Bash Script
  • crontab.txt – Modified
    Open VPN Firewall on reboot
    Use check_ip.py for all functions
  • defaults.txt – Modified
    Updated cipher to AES-256-GCM
    Removed deprecated compress option
    Replaced deprecated comp-lzo with compress lzo
    Replaced deprecated ns-cert-type with remote-cert-tls
  • iptables_rules.sh.txt – For Tor support | Modified
    Fix for typo on ‘Adapter’ variable assignment
  • open_vpn_firewall.sh.txt – Modified
    Fix for typo on ‘Adapter’ variable assignment
    Wait 30sec on execution for Network Adapters to be named
  • ReadMe.txt – Instructions and contents of .zip file
  • server.conf.txt – Modified
    Updated cipher to AES-256-GCM
    Removed deprecated compress option
    Replaced deprecated comp-lzo with compress lzo
    Disabled specified IP Address binding as it fails under Stretch
  • stunnel.conf.txt – No changes
  • torrc.txt – New | Tor Config file
  • wget_Portmapper.txt – New | command to download PortMappper

Pre 3rd Edition:

  • check_ip.sh.txt – Enhanced
    Version 3.1 | Added Support for MiniUPnP, an alternative to PortMapper
    Version 3.0 | Added SSL Support for OpenVPN over SSL. General cleanup
    Version 2.6 | Easier disabling of PortMapper for routers that don’t support UPnP
    Version 2.5 | Better diagnostics w/emails. Removed ‘check_ip.txt’ not found error
    Version 2.3 | Corrected to retrieve only IPv4 External Addresses
    Version 2.2 | Added check on External IP to update defaults.txt file
    Version 2.1 | Enhanced to automatically find the correct router in multi-router installations
    Version 2.0 | Corrected from Revision 1.0 of the book
  • clean_sys.sh.txt – Original
  • crontab.txt â€“ Original | Not actually a script
  • defaults.txt â€“ Original | Not actually a script
  • MakeOVPNc.sh.txt – Original
  • open_vpn_firewall.sh.txt – Corrected from Revision 1.0 of the book
  • ReadMe.txt â€“ Instructions and contents of .zip file
  • restart.sh.txt – Original
  • restart_ssl.sh.txt – Original
  • restart_vpn.sh.txt – Original
  • server.conf.txt – Original | Not actually a script
  • stunnel.conf.txt – Original | Not actually a script