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

Re: [Openvpn-users] DHCP linux clients


  • Subject: Re: [Openvpn-users] DHCP linux clients
  • From: "James Yonan" <jim@xxxxxxxxx>
  • Date: Sat, 15 May 2004 00:07:16 -0000

[oops, hit send before message was finished]

Take a look at the --route-up script feature.

Try breaking up the home.up script so that

home.up:
  ifconfig tap0 up

route.up:
  dhcpcd -R tap0

Then use --route-delay to delay the route.up script.

Does dhcpcd fork off a daemon and return immediately?  If so, great.  If not,
put an ampersand ('&') on the dhcpcd command line so it doesn't stall the
openvpn event loop.

Another approach would be something like this:

route.up:
  sleep 10
  dhcpcd -R tap0

home.up:
  ifconfig tap0 up
  ./route.up &

Now you only need an --up script.

I know about this DHCP client delay very well, because Window's clients need
something like this to work.

James
 

Emotional Vampire <vampire@xxxxxxxxxxxxxxxx> said:

> Hello,
> 
> I'm using OpenVPN 1.6.0rc3 on many computers and it works well. The only
> problem is that, if linux client machine wants to get address by DHCP.
> If i put dhcpcd (dhcp client) line into home.up script like that:
> 
> ifconfig tap0 up
> dhcpcd -R tap0
> 
> dhcpcd is trying to get an IP address from server but server don't see
> any request.
> 
> If i put only "ifconfig tap0 up" line, and start dhcpcd manually from
> console after start of OpenVPN everything is OK.
> 
> Is anybody know, why it doesn't work ?
> 
> my configs:
> 
> server (Linux 2.4.25):
> 
> inetd nowait
> proto tcp-server
> dev tap
> ifconfig-noexec
> tls-server
> up /etc/openvpn/scripts/server.up
> dh /etc/openvpn/private/dh1024.pem
> ca /etc/openvpn/private/ca.crt
> cert /etc/openvpn/private/server.crt
> key /etc/openvpn/private/server.key
> user nobody
> group nobody
> ping 15
> comp-lzo
> verb 3
> crl-verify /etc/openvpn/banned.pem
> 
> clients (Linux 2.2.25/2.4.26/2.6.4):
> 
> dev tap
> proto tcp-client
> remote <gate IP>
> up ./home.up
> up-delay
> tls-client
> ca ca.crt
> cert Sebastian_Wasilewski.crt
> key Sebastian_Wasilewski.key
> port 5000
> comp-lzo
> ping 15
> ping-restart 45
> verb 1
> connect-retry 20
> 
> 
> Thanks for any help.
> Sebastian
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: SourceForge.net Broadband
> Sign-up now for SourceForge Broadband and get the fastest
> 6.0/768 connection for only $19.95/mo for the first 3 months!
> http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
> _______________________________________________
> Openvpn-users mailing list
> Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/openvpn-users
> 



-- 





____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users