OpenVPN Troubleshooting

Recently I tried installing and setting up OpenVPN on my home server. I ran into a problem I had had before. Both the installation of the .deb package and the init script would hang.

I found the –verbose switch to the /usr/local/openvpn_as/bin/ovpn-init command. it would always hang right after “Generating init scripts auto command”. As generating the init scripts should be instantaneous, this was frustrating. At one point in the script is calls /usr/local/openvpn_as/bin/_ovpn-init and attempts to list the iptables config with iptable –list and put it into a variable. My iptables list is LARGE and uses the hostnames of several IPs I want blocked. (Think asian and Russian sites.)┬áThat iptables command it uses does DNS on every hostname. It should use (and I changed the script) to use iptables –list -n which skips DNS.

Now the ovpn-init script runs and doesn’t hang.