OpenVPN key generation tool
Generate shared-secret key with specified file name
<filename>
result=1;
key_path=$4
full_path=
# Prepend /config/auth if the path is not absolute
if echo $key_path | egrep -ve '^/.*' > /dev/null; then
full_path=/config/auth/$key_path
else
full_path=$key_path
fi
key_dir=`dirname $full_path`
if [ ! -d $key_dir ]; then
echo "Directory $key_dir does not exist!"
exit 1
fi
echo "Generating OpenVPN key to $full_path"
sudo /usr/sbin/openvpn --genkey --secret "$full_path"
result=$?
if [ $result = 0 ]; then
echo "Your new local OpenVPN key has been generated"
fi
/usr/libexec/vyos/validators/file-exists --directory /config/auth "$full_path"
Reset a service
Reset specified OpenVPN client
echo kill $4 | socat - UNIX-CONNECT:/tmp/openvpn-mgmt-intf > /dev/null
Reset OpenVPN process on interface
sudo kill -SIGUSR1 $(cat /var/run/openvpn/$4.pid)
Show OpenVPN interface information
Show detailed OpenVPN interface information
${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=openvpn --action=show
Show OpenVPN interface information
${vyatta_bindir}/vyatta-show-interfaces.pl --intf=$4
Show summary of specified OpenVPN interface information
${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" --action=show-brief
Show OpenVPN information
Show tunnel status for OpenVPN client interfaces
sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=client
Show tunnel status for OpenVPN server interfaces
sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=server
Show tunnel status for OpenVPN site-to-site interfaces
sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=site-to-site