[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: samwun <samwun@xxxxxxxxxxxxxxxx>
  • Date: Sat, 15 May 2004 19:17:34 +0800

James Yonan wrote:

[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




Is this a way to setup user remote access control for openvpn users, if not, is there any way I can setup user remote access control thru openvpn?

sam

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









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