# [SOLV] bridged openvpn: circular dependency starting net.br0

## Fran

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:

```
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):

```
#!/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:

```
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:

```
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  :Mad:  . Oh well, maybe this will help someone in the future.

----------

## AngelKnight

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.

----------

