Raspberry Pi ‐ OpenVPN - a-maze-1ng/MISC GitHub Wiki

Step by Step - Last Update: 2025-12-28

  1. sudo -i
  2. [optional] raspi-config --> change hostname
  3. apt-get update && apt-get upgrade -y && apt-get autoremove -y
  4. https://github.com/Nyr/openvpn-install --> see installation script
    4.1 wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
    4.2 This server is behind NAT. What is the public IPv4 address or hostname?
    Public IPv4 address / hostname [xx.xx.xx.xx]: xyz.ddns.net (e.g. noip.com)
  5. activate port forwarding @ router
  6. install noip duc on raspberry pi --> https://www.noip.com/support/knowledgebase/install-linux-3-x-dynamic-update-client-duc
    6.1 wget --content-disposition https://www.noip.com/download/linux/latest
    6.2 tar xf noip-duc_3.3.0.tar.gz
    6.3 apt install ./noip-duc_3.3.0_arm64.deb
  7. nano /home/pi/scripts/noip_duc.py
    7.1 noip-duc -g myhostname.ddns.net -u username -p password --> save + exit
    7.2 chmod 777 noip_duc.py
  8. crontab -e --> see example scirpt in cryptomator
    8.1 @reboot python ${home_dir}noip_duc.py >> ${logfile_dir}log_noip_duc_$(${timestamp}).log 2>&1

Tutorial (sempervideo):

Video 2
Video 3
Video 4

Install for RPi:

https://github.com/Nyr/openvpn-install

Unblock ports for VPN @Fritz!Box

Pic1

[Old] start NoIP (DUC) dynamic update client automatically

  • nano /etc/rc.local
  • add /usr/local/bin/noip2 & before exit 0