add route called from script

Per olof Ljungmark peo at intersonic.se
Thu Jul 8 14:29:45 PDT 2004


Hi all,

I am experimenting with openvpn-2 and so far it looks promosing. As this 
version of openvpn can assign client addresses similar to dhcp, I need 
to find out how to assign a route from a script, like (this is the 
client end, running FreeBSD):

[simplifed example]
#!/bin/sh
openvpn --daemon --config my-vpn.conf
route add 192.168.0.0/16 <adress from tun{if} here>

How/from where can I get the dynamically assigned tun ip to insert into 
script? It is not known before openvpn is started.

Thanks,

Per olof


More information about the freebsd-questions mailing list