I've just been to hell and back trying to get my bridged VPN to work. But now it works, I'm in heaven. It's wonderful. Getting it working would have been a lot easier if there had been a better init script for the bridge. The problem with the current one is that it assumes that the interfaces for the bridge are already present. I was trying to bridge tap0 with eth0 but tap0 didn't exist yet because OpenVPN hadn't started yet... but OpenVPN needed network access. Catch 22? Almost. I could create a "permanent" tap0 device that would exist before starting OpenVPN. So I made net.tap0 but how was I to ensure that got executed before bridge? I was getting tangled up in dependencies and it wasn't looking pretty. I thought there had to be a simpler solution. Well I cracked it. This new script runs each interface's script and then runs the bridge's script. For example, if the bridge br0 comprises of eth0 and tap0 then net.eth0 gets run, followed by net.tap0 and then net.br0. It is not necessary to add any of the net.* scripts to the default runlevel. Only the bridge script is necessary (and the openvpn script if you're using that). eth0 should not be given an IP and needs to be in promiscuous mode so that is simply stated in /etc/conf.d/net with "0.0.0.0 promisc" as the ifconfig setting. I have also included the script necessary to create tap0. Perhaps this could be included with the OpenVPN package? I've tested this out on two machines and it works great.
Created attachment 40253 [details] New bridge init script
Created attachment 40254 [details] net.tap0 init script
Oh yeah and this also works with the old-style network init scripts. One of the machines I tried this on uses x86 and the other uses ~x86.
*bump* I don't mean to be impatient but I think this is a major improvement on the current script and could save people many hours of confusion.
*** Bug 64914 has been marked as a duplicate of this bug. ***
We already have a re-worked bridging script in CVS which incorporates your idea slightly. bridge_br0="eth0 tun0" ifconfig_br0=( "null" ) ifconfig_tun0=( "null" ) net.br0 linked to net.lo net.tun0 linked to net.lo This config will create a bridge called br0 and it will detect that tun0 does not exist and it will run net.tun0 start to create it. This will be in baselayout-1.11.6
*** Bug 62191 has been marked as a duplicate of this bug. ***
Fixed in baselayout-1.11.6