|
|
On Fri, Oct 01, 2004 at 07:30:29PM +0200, Mathias Sundman wrote: > 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? > > > > -- Ed, very happy with OpenVPN so far, still trying to understand > >all the bells and whistles. > > OpenVPN should re-read the config-dir when a new client connects. It does > for me atleast! Are you sure you have used the right name? Yes. I just added a "push" command to the file. Restarting or reloading the client didn't get the new information. Reloading the server, then reloading the client, brought over the "push" command (a new route), but since I'd forgotten the quotes around the route command, it generated a syntax error. I fixed the problem in the client-config file, but the erroneous command was still being sent until I HUP'd the server. > Does it read your file if you restart OpenVPN? Yes, either restarting or HUP'ing seems to work. Curious, I just tested via ktrace - I only saw the client-config file get re-opened after I HUP'd the server: 10030 openvpn CALL open(0x80f2804,0,0x1b6) 10030 openvpn NAMI "client-config/test-client-1" 10030 openvpn RET open 7 10030 openvpn CALL close(0x7) That seems to be from the test_file() function that opens and closes a file to make sure it exists. Perhaps openvpn doesn't think the connection has really terminated (it's a UDP server), so even though I've restarted the client, which has sent a new "PUSH REQUEST", it thinks the client is just asking for the parameters of an existing session? If I stop the client, wait a minute or two for the server to notice that the connection has gone away, and then restart the client, the updated parameters are pushed. That seems to bolster the theory above. ____________________________________________ Openvpn-users mailing list Openvpn-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/openvpn-users |