View previous topic :: View next topic |
Author |
Message |
Fran Guru
Joined: 29 Feb 2004 Posts: 530 Location: Coruña (Spain)
|
Posted: Thu Feb 21, 2013 5:50 pm Post subject: [SOLV] bridged openvpn: circular dependency starting net.br0 |
|
|
I'm trying to setup a router with a bridged openvpn. My setup is this:
internet<--->eth0-pc-eth1<--->lan (10.68.32.0/22)
I can get everything working with this conf.d/net:
Code: | config_eth0="x.x.x.x netmask 255.255.255.0 broadcast x.x.x.255"
routes_eth0="default via x.x.x.1"
config_eth1="10.68.32.17 netmask 255.255.252.0 broadcast 10.68.35.255" |
and if I run this bridge.start after boot (dropping it in local.d):
Code: | #!/bin/bash
openvpn --mktun --dev tap0
brctl addbr br0
brctl addif br0 eth1
brctl addif br0 tap0
ifconfig tap0 0.0.0.0 promisc up
ifconfig eth1 0.0.0.0 promisc up
ifconfig br0 10.68.32.17 netmask 255.255.252.0 broadcast 10.68.35.255
/etc/init.d/openvpn start
|
Now, I'd like to use /etc/conf.d/net to setup everything. So I create net.br0 and net.tap0 symlinks to net.lo and use this conf.d/net:
Code: | tuntap_tap0="tap"
config_tap0="0.0.0.0"
config_eth1="0.0.0.0"
bridge_br0="eth1 tap0"
config_br0="10.68.32.17 netmask 255.255.252.0 broadcast 10.68.35.255"
rc_net_br0_need="net.eth1 openvpn"
|
If I DON'T add net.br0 to any runlevel, I can boot, login, run /etc/init.d/net.br0 start, and everything works as before. BUT, if I add net.br0 to the default runlevel, I get:
Code: | ERROR: cannot start dnsmasq as openvpn would not start
ERROR: cannot start openvpn as net.br0 would not start
ERROR: cannot start net.br0 as openvpn would not start
... |
Seems like a circular dependency. Any solution?
(edit) Duh, I had to replace rc_net_br0_need="net.eth1 openvpn" with rc_net_br0_need="net.eth1 net.tap0". All the wikis, manuals , howtos and forum posts I've read about setting up a tap bridge are wrong . Oh well, maybe this will help someone in the future. |
|
Back to top |
|
|
AngelKnight Tux's lil' helper
Joined: 14 Jan 2003 Posts: 127
|
Posted: Sun Feb 24, 2013 10:55 am Post subject: |
|
|
Pretty sure that this is adequate, and would have pointed you in the right direction.
Incidentally, "0.0.0.0" might work but I'd probably go for config_$INTF="null" instead with openRC. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|