This repository contains on boot scripts which handle various things, see below for more details.
This patch is no longer necessary as the UDM Pro now has proper OpenVPN client capabilities built-in.
-
First install the excellent UDM on-boot-script package from boostchicken/udm-utilities.
-
Download this repository and adjust its configuration to your needs.
-
Edit the
install.sh
script and change theROUTER
to your routers IP address and runinstall.sh
-
Login to your UDM via ssh and run the on_boot.d scripts to activate them.
They should persist across reboots and firmware updates per the on_boot project.
This script appends the authorized_keys file in udm-patches\root-ssh to the root authorized_keys file upon boot.
This script installs the openvpn-wrapper.sh symlink to intercept UDM openvpn start/stop requests and allows you to use an entirely customized OpenVPN config file (.ovpn) while keeping it integrated with the UDM OS.
You should setup an openvpn-N directory within udm-patches with your custom openvpn.conf file.
See the existing openvpn-N file for instructions to modify your own config file.
If you only have one VPN connection, the directory would be openvpn-1. If you have multiple tunnels you may override
any or all of them by creating the appropriate openvpn-N
directory where N
corresponds to the tunnel number in use by the UDM.
Once your configuration file is ready and in place, create a new site to site OpenVPN in the UDM gui using any parameters that will allow you to save. The wrapper script will re-route the openvpn call to utilize your custom config and setup tunnel masquerading. It is assumed that the server you are connecting to will push the routes to the UDM.
If you are having trouble with the connection, you can see the output of the last intercepted openvpn run by looking at the file /tmp/openvpn-orig.log
on the base alpine image which is a redirect of the openvpn command output.