|
|
On Fri, 1 Oct 2004, Ed Ravin wrote: > I'm testing OpenVPN 2.0beta11 on NetBSD 1.6.2. I'm using client-config-dir > to run a script when a client connects. The script has only one line, > an "ifconfig-push" directive to give the client the desired IP address. > > When I update the script, or add a new one, the server still serves > the old information (or doesn't notice the new script). I need to > restart the server (or maybe reload, haven't tested that yet). > Shouldn't openvpn notice that the files have changed, or at least > that a new file exists in the directory? The OpenVPN server will only reload a client-config-dir file when a new client instance object is created. In TCP mode, the client instance object has the same lifetime as the TCP connection. So if you disconnect and reconnect, you will definitely be connecting to a new client instance object on the server. In UDP mode the client instance may "hang around" for a while after client disconnect until timeout. So in UDP mode you could conceivably disconnect and reconnect shortly thereafter and still be connected to the same client instance object (so no --client-config-dir re-read in this case). Here are some ways to force the server to make a new client instance object, thus re-reading the client-config-dir file: (1) Reconnect from a different port number. --nobind usually does this, or you can try a different --lport value. (2) Wait for the old client instance object to time out (controlled by --ping-restart or --keepalive) then reconnect. (3) Force an explicit close using --explicit-exit-notify on the client. James ____________________________________________ Openvpn-users mailing list Openvpn-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/openvpn-users |