[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] How to initialize bridge at boot time?


  • Subject: Re: [Openvpn-users] How to initialize bridge at boot time?
  • From: Mike <azmr@xxxxxxxxxxxxx>
  • Date: Thu, 13 Jan 2005 18:57:59 -0700 (MST)


Thanks Brent -

I didn't do a very good job of explaining my problem. And I'm not sure that this the right list for this question. But in case it is, here are more details.

The server that OpenVPN is running on also has many other services running, sendmail, bind, dhcp, ldap, httpd etc. Some of these I am binding to the internal IP address as I don't want them to service "outside" requests. In order for these to start correctly I have to have my internal ethernet availble and initialized when the other services start. To very this I tried changing ONBOOT to NO in /etc/sysconfig/networking-scripts/ifcfg-eth1.

What I think I need is a way to bring up the eth1/tap0/br0 bridge at the point in system boot where eth1 is normally brought up.


On Thu, 13 Jan 2005 bgardner@xxxxxxxxxxxx wrote:

Mike-

Here is what works for me:

Given that the network I want my remote users to be able to connect to
is accessible via eth0 and I am creating a TAP device called tap0, I
create a bridge once per boot of the OpenVPN server:

 brctl addbr br0
 brctl addif br0 eth0


I hard-code eth0 with IP address info instead of using DHCP.

These commands are run every time OpenVPN starts:

 brctl addif br0 tap0
 ip link set tap0 up


After this is done remote clients are able to get IP addresses via the DHCP server on my internal network.

These commands are also scripted to run again every time OpenVPN
restarts due to ping-restart.

HTH

Brent Gardner
Network Administrator
IPRO Tech, Inc.
602-324-4776
www.iprocorp.com


-----Original Message-----
From: openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx
[mailto:openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike
Sent: Wednesday, January 12, 2005 7:20 PM
To: Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
Subject: [Openvpn-users] How to initialize bridge at boot time?



What is the proper way to initialize or create a bridge on a
linux box at
boot time?  I currently initialize both ethernet interfaces,
eth0 external
and eth1 internal in the "normal" way via the init scripts.  Then in
rc.local I run the equivalent of the bridge-start script from the 2.0
examples.

This seems to work intermittently.  When it doesn't work, the
only problem
I have is that IP addresses are never assigned via dhcp.  If
I look in
/var/log/messages I see the dhcp requests on eth0.  When it
does work I
see dhcp requests on br0.

My guess is that dhcpd is not sure which interface to listen on after
bridge-start yanks eth1 out from underneath it(?).

-- Thanks, Mike




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users