Configuring the DHCP module to forward request to another Radius server.
Hi. I'm trying to use Freeradius 2.2.0 to catch DHCP request on a local network (a specific interface and physical network of my machine), and forward it to another radius server (through another interface), using the radius protocol, to get authorized, and get the IP address to respond with to the DHCP request. I managed to successfully install freeradius, the DHCP module listens and interpret properly incoming requests (and performs properly some attribute rewrites), but I can't find out what line(s) I should put in the "dhcp DHCP-Discover" section of dhcp.conf, to turn the incoming DHCP request into an outgoing radius request to get IP address and authorization from the other radius server (basically, do the proxy job !). I see that there is an example to get authorization and IP allocation with "mac2ip" locally, based on a file, but not how to trigger the forwarding of a new request. Any advice / idea ?
Fabrice-externe SEGURA wrote:
I'm trying to use Freeradius 2.2.0 to catch DHCP request on a local network (a specific interface and physical network of my machine), and forward it to another radius server (through another interface), using the radius protocol, to get authorized, and get the IP address to respond with to the DHCP request.
It doesn't do that.
Any advice / idea ?
Substantial code changes. We're looking to do this as part of the v3 release cycle. But it requires major changes to the code. Alan DeKok.
Hi. I was afraid this would come out that way....Thanks for the response anyway, it prevent me to further useless research. I will have to hand-knit me this piece of code. A suggestion for v3 : It should be possible then to turn the simple dhcp request into 2 radius request : the auth request + the acct start request. Icing on the cake : dhcp-release should also transform into an acct stop. Best regards Fabrice De : aland@deployingradius.com A : freeradius-users@lists.freeradius.org Date : 08/08/2013 14:42 Objet : Re: Configuring the DHCP module to forward request to another Radius server. Envoyé par : freeradius-users-bounces+fabrice-externe.segura=erdfdistribution.fr@lists.freeradius.org Fabrice-externe SEGURA wrote:
I'm trying to use Freeradius 2.2.0 to catch DHCP request on a local network (a specific interface and physical network of my machine), and forward it to another radius server (through another interface), using the radius protocol, to get authorized, and get the IP address to respond with to the DHCP request.
It doesn't do that.
Any advice / idea ?
Substantial code changes. We're looking to do this as part of the v3 release cycle. But it requires major changes to the code. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Fabrice-externe SEGURA wrote:
A suggestion for v3 : It should be possible then to turn the simple dhcp request into 2 radius request : the auth request + the acct start request. Icing on the cake : dhcp-release should also transform into an acct stop.
That's a lot harder. As always, patches are welcome. Alan DeKok.
On 8 Aug 2013, at 16:45, Alan DeKok <aland@deployingradius.com> wrote:
Fabrice-externe SEGURA wrote:
A suggestion for v3 : It should be possible then to turn the simple dhcp request into 2 radius request : the auth request + the acct start request. Icing on the cake : dhcp-release should also transform into an acct stop.
That's a lot harder.
It's one of the uses of request fanout we've discussed before. One of the problems is handling the responses in a sane way. Do you refuse to response to the client unless you get an Accounting-Response for example.
As always, patches are welcome.
As a hack just use exec and radclient to generate the packets and feed them back into the server. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
As a hack just use exec and radclient to generate the packets and feed them back into the server.
Interesting. That suggest there might be a way to make it work after all...(I merely need a hack, it's for the purpose of simulating behavior of an operators's GGSN towards a system that distributes IP to GSM devices, then talks to them via the IP address provided) Some explanation / samples on how to use the exec inside the DHCP script files ?
Hi. Your approach (use an external script) finally worked It's definitely a hack, as I discovered that Linuxes don't do any DHCP-Release (and I expected to send a radius acct stop at this point). Nevertheless, it will help me to emulate a mobile operator network behaviour, when a machine connects trhough a modem, with the same machine just connected locally on it's ethernet interface, and that's all I needed - Thanks a lot for the tip (not to mention the freeradius software itself) A word on documentation however : It's quite an understatement to say that it can be improved. Regards
On 9 Aug 2013, at 15:35, Fabrice-externe SEGURA <fabrice-externe.segura@erdfdistribution.fr> wrote:
Hi.
Your approach (use an external script) finally worked
It's definitely a hack, as I discovered that Linuxes don't do any DHCP-Release (and I expected to send a radius acct stop at this point). Nevertheless, it will help me to emulate a mobile operator network behaviour, when a machine connects trhough a modem, with the same machine just connected locally on it's ethernet interface, and that's all I needed - Thanks a lot for the tip (not to mention the freeradius software itself)
A word on documentation however : It's quite an understatement to say that it can be improved.
Feel free to contribute. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
Fabrice-externe SEGURA wrote:
A word on documentation however : It's quite an understatement to say that it can be improved.
We've had ~15 years of people complaining about this. So far, contributions have been sporadic. Doing documentation takes a concerted effort, and commitment. It's easy to complain. It's hard to do work. Alan DeKok.
Am Donnerstag, 8. August 2013, 09:19:30 schrieb Fabrice-externe SEGURA:
Hi.
I'm trying to use Freeradius 2.2.0 to catch DHCP request on a local network (a specific interface and physical network of my machine), and forward it to another radius server (through another interface), using the radius protocol, to get authorized, and get the IP address to respond with to the DHCP request.
You want to try the DHCP relay agent feature implemented on every "better" router or layer 3 switch. Greetins, -- Mit freundlichen Grüßen, Michael Schwartzkopff -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64, +49 (162) 165 0044 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
participants (4)
-
Alan DeKok -
Arran Cudbard-Bell -
Fabrice-externe SEGURA -
Michael Schwartzkopff