What's new

OpenVPN reset to defaults

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

davepnw

New Around Here
Trying to get OpenVPN working again on a remote RT-N66U (Merlin Firmware: RT-N66U_3.0.0.4_374.40_0) - is there any way (via SSH or otherwise) to reset the OpenVPN services settings back to all defaults?
 
As the /etc/init.d/openvpn script (which is what gets executed by /usr/sbin/service) does not offer any options to do it (at least with ubuntu-10.04), the answer is no.

But since it is all scripts, you can just edit /etc/init.d/openvpn and add something like

named-restart)
log_action_begin_msg "Restarting $DESC $2"
PIDFILE="/var/run/openvpn.${2}.pid"
NAME=$2
log_daemon_msg " Stopping VPN '$NAME'"
stop_vpn
sleep 1
log_daemon_msg " Restarting VPN '$NAME'"
start_vpn
if test -z "$PIDFILE" ; then
log_warning_msg " VPN $2 is not running."
fi
;;
after the

case "$1" in
dirctive. Later, you can simply call service openvpn named-restart <vpn-name>.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top