Subject: route default delete -- by script, not by root
To: None <netbsd-help@netbsd.org>
From: Gan Uesli Starling <alias@starling.us>
List: netbsd-help
Date: 02/02/2003 19:19:19
Am working on scripts for a VPN made from
ssh-ip-tunnel. This VPN builds a tunnel from
a remote laptop via dial-up ISP over the Inet
to a LAN with a static IP.

Am trying to make that VPN as self-healing as
can get. The scripts are owned by "vpnuser" in
the wheel group. It auto-starts and auto-restarts
if remote PPP gets killed, or if POTS line hangs
up.

But if local PPP gets "kill" then the dial-up
ISP cannot set the default route due to left-over
default route from before.

So I need a way for that script, owned by vpnuser,
to delete the default route before pppd tries to
call the ISP for re-connect of the VPN.

I wrote a separate script which has..

route delete default

...in it and is chown root and chmod 6770 which
I thought could be called by the script owned
by vpnuser.

But alas that is no go. I get "permission denied"

Is there another way for a script owned by a user
in the wheel group to delete the default route? or
to flush routes?

I don't want to do any of these:

1. Run the VPN as root.
2. Allow root access to SSh.
3. Allow empty passwords for SSh.

Thanks,

Gan

-- 

  Mistera Sturno - Rarest Extinct Bird

  <(+)__       Gan Uesli Starling
   ((__/)=-    Kalamazoo, MI, USA
    `||`
     ++        http://starling.us