> >Also how do I remove old tunx devices? 
> >
> >What the? How do I get rid of the others? tun0 seems to be 
> only in use 
> >there.
> >
> >If a connection drops out, I just connect again, but it 
> leaves old tun 
> >devices and makes a new one, and sometimes I have to manually 
> >delete/add correct routes.
> 
> Not sure if this is the correct way, let alone the easiest, 
> but this is how I do
> it:
> 
> if [ `ifconfig -a|grep -c tun0` -ne 0 ]; then
>                               /sbin/ifconfig tun0 destroy
> fi &&
> 
> start connection here
> 
> where you would do this depends on your setup. In mycase I 
> have a specific script that brings the connection up.
>

That works nicely. Unfortunately I've had to change my gateway from OpenBSD
to FreeBSD, and even though destroy is specified in the manpage, it says
this... ifconfig: SIOCIFDESTROY: Invalid argument

Reply via email to