How to run script after OpenVPN's TUN driver is up under Ubuntu
772
I would like to execute a bash script after a TUN driver (e.g. tun0) is up under ubuntu 9.04/9.10. I need it to use the assigned VPN IP in some configuration scripts.
Do you have any suggestion?
Look in the manual page for the --up cmd configuration entry. The script cmd is passed a whole lot of environment variables that tell it what is going on, and anything you might want to do is covered by those.
Look in the manual page for the
--up cmd
configuration entry. The scriptcmd
is passed a whole lot of environment variables that tell it what is going on, and anything you might want to do is covered by those.You can try the
--up
switch (on command lien) or theup
directive (in config file). See the OpenVPN MAN page.