Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
when bridging openvpn, is it possible to start net depends
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
nivw
Apprentice
Apprentice


Joined: 09 Nov 2005
Posts: 261

PostPosted: Mon Jan 04, 2010 12:40 pm    Post subject: when bridging openvpn, is it possible to start net depends Reply with quote

Hi,
I changed openvpn to establish connection using tap0 (layer2).
I am using openRC current 0.6.0 .
I now have this in my /etc/conf.d/net
Code:

modules=( "openvpn" )
bridge_br0="eth1 tap0"
config_br0=( "192.168.1.70/24" )
brctl_br0=( "stp on" )

depend_br0() {
        need net.eth1 openvpn
}

all works well.
but what will happen if openvpn fails to connect? can I still load all the services depended on net and only have net.tap0 added to the bridge if it is well?
Back to top
View user's profile Send private message
gami
Apprentice
Apprentice


Joined: 02 Jun 2006
Posts: 297

PostPosted: Mon Jan 04, 2010 3:56 pm    Post subject: Reply with quote

FWIW, I use a slightly different approach to the same setup. I let openrc's network script set up the bridge and tap adapter unconditionally, and then tell openvpn to use the already established tap adapter.
Code:
# cat /etc/conf.d/net
config_eth0=("null")
tuntap_tap0=("tap")
config_tap0=("null")
bridge_br0=("eth0 tap0")
config_br0=("192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255")
routes_br0=("default via 192.168.0.1")
brctl_br0=("stp on")
depend_br0() {
    need net.eth0 net.tap0
}
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