I've tried this before and it's confusing, I'm new to freebsd.Site-to-Site Routing
openvpn.net
Acho que é isto que estás à procura.
client-config-dir ccd
client-connect ccd/c.sh
script-security 2
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
RNET="10.1.2.0/24"
if [ "$common_name" = "client-name-in-cert" ]
then
sudo /sbin/route delete $RNET
sudo /sbin/route add $RNET $ifconfig_remote
fi
exit 0
iroute 10.1.2.0 255.255.255.0
push "route 10.1.1.0 255.255.255.0"
openvpn ALL=(ALL) NOPASSWD:/sbin/route