Subject: Re: routing from tun0 to ppp0
To: Florian Stoehr <netbsd@wolfnode.de>
From: Brian de Alwis <bsd@cs.ubc.ca>
List: netbsd-users
Date: 11/19/2006 10:39:07
I asked a similar question a while back, and Jonathan Kollasch
provided a cool hack <http://jakllsch.kollasch.net/Santraginus>:

    bridge to autoselect wired over wireless

    Uses STP to prevent loops and select prefered interface (in this case
    rtk0 using ath0's addresses

    #!/bin/sh
    ifconfig bridge0 create
    ifconfig rtk0 inet6 2002:a867:36dd:1:2c0:9fff:fe98:XXXX deprecated
    ifconfig rtk0 inet6 fd40:b302:7d80:7001:2c0:9fff:fe98:XXXX deprecated
    ifconfig rtk0 up
    brconfig bridge0 add rtk0 stp rtk0 ifpathcost rtk0 54 add ath0 stp \
	ath0 maxage 4 fwddelay 3 hellotime 1
    ifconfig bridge0 up

Brian.

On 2006.11.19 01:59:55 +0100, Florian Stoehr wrote:
> now what i'd like to do is to make all traffic that arrives from
> the openvpn tunnel -from various clients- at tun0 pass out
> to the other tunnel ppp0.

-- 
  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
      "Amusement to an observing mind is study." - Benjamin Disraeli