|
From: | Stuart Stevenson |
Subject: | [Radiusplugin-users] Framed-IP-Address problem |
Date: | Tue, 14 Jun 2011 17:38:35 +0100 |
Hi, I’m trying to get the correct Framed-IP-Address stored into the database, but it won’t update with the new value. First, I connect to OpenVPN, and by default, it tries to assign an IP from the range 10.8.0.0/24 (hence the 10.8.0.2) the RADIUS-PLUGIN sees below: Tue Jun 14 17:23:09 2011 RADIUS-PLUGIN: FOREGROUND: OPENVPN_PLUGIN_CLIENT_CONNECT is called. Tue Jun 14 17:23:09 2011 RADIUS-PLUGIN: FOREGROUND: Key: 192.168.10.8:47386. Tue Jun 14 17:23:09 2011 RADIUS-PLUGIN: FOREGROUND: Set FramedIP to the IP (10.8.0.2) OpenVPN assigned to the user bob However, I have a client-connect script which pulls a random IP from the 10.8.0.0/24 range and puts the random Framed-IP-Address into this dynamic config file. As can be seen below, OpenVPN recognises this and updates according (including in the status file): Tue Jun 14 17:23:09 2011 us=553408 bob/192.168.10.8:47386 OPTIONS IMPORT: reading client specific options from: /tmp/openvpn/ifconfig/openvpn_cc_3745795b4223cfddef61f0260b52ec84.tmp Tue Jun 14 17:23:09 2011 us=742109 bob/192.168.10.8:47386 OPTIONS IMPORT: reading client specific options from: /tmp/openvpn/ifconfig/openvpn_cc_eb3789928b91000666b54c31ecbcc26b.tmp Tue Jun 14 17:23:09 2011 us=742409 bob/192.168.10.8:47386 MULTI: Learn: 10.8.0.211 -> bob/192.168.10.8:47386 Tue Jun 14 17:23:09 2011 us=742449 bob/192.168.10.8:47386 MULTI: primary virtual IP for bob/192.168.10.8:47386: 10.8.0.211 My problem is that the RADIUS-PLUGIN does not pick up on the fact that there is an updated Framed-IP-Address, and still updates the database with the old Framed-IP-Address. Even with accounting updates like below, (not knowing C/C++ well enough to make sense of the source code), I would assume that when the plugin reads the status file, it would update any new information, including the updated Framed-IP-Address, but it still updated the database with 10.8.0.2. Tue Jun 14 17:27:09 2011 RADIUS-PLUGIN: BACKGROUND ACCT: Scheduler: Read Statusfile. Tue Jun 14 17:27:09 2011 RADIUS-PLUGIN: BACKGROUND-ACCT: Get ACCOUNTING_RESPONSE-Packet. Tue Jun 14 17:27:09 2011 RADIUS-PLUGIN: BACKGROUND-ACCT: Scheduler: Update packet for User bob was send. Perhaps I am just doing something wrong, or maybe the plugin just isn’t written to pull and update the Framed-IP-Address from the status file on every accounting update? Regards, Stuart. |
[Prev in Thread] | Current Thread | [Next in Thread] |