Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLV] bridged openvpn: circular dependency starting net.br0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 521
Location: Coruña (Spain)

PostPosted: Thu Feb 21, 2013 5:50 pm    Post subject: [SOLV] bridged openvpn: circular dependency starting net.br0 Reply with quote

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 :x . Oh well, maybe this will help someone in the future.
Back to top
View user's profile Send private message
AngelKnight
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 118

PostPosted: Sun Feb 24, 2013 10:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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