Variables in clients.conf and user config.
Is it possible to define a variable in the clients.conf file, and then use that in the users config file. For example, I want to be able to pass back a particular setting based on which client the request comes from. EG: I have clients.conf: client 01 { ipaddr = 1.2.3.4 netmask = 28 secret = xxxxxxxx } client 02 { ipaddr = 5.6.7.8 netmask = 28 secret = xxxxxxxxxx } Then in my users, I would like to pass back an attribute based on which client the request came from. So I can do: Username_test Cleartext-Password := "test" Framed-IP-Address = 9.10.11.12 Framed-IP-Netmask = 255.255.255.255, Tunnel-Type = L2TP, Tunnel-Client-Auth-Id = xxxxx, Tunnel-Server-Endpoint = <client IP>, (Want to base this on the client the request came from, eg just lift the ipaddr attribute) Tunnel-Password = xxxxxxx, Is this possible?? Marc Beaumont Network Admin / Linux Specialist Comms 365 marc.beaumont@comms365.com<mailto:marc.beaumont@comms365.com> Scanned by MailDefender - managed email security from intY - www.maildefender.net
Tunnel-Server-Endpoint = <client IP>, (Want to base this on the client the request came from, eg just lift the ipaddr attribute) Tunnel-Password = xxxxxxx,
Is this possible??
No, but you can use unlang to provide that information in the post-auth section: Update reply { Tunnel-Server-Endpoint := "%{client:ipaddr}" } :-) Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc¹s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800. Jisc Collections and Janet Ltd. is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under Company No. number 2881024, VAT No. GB 197 0632 86. The registered office is: Lumen House, Library Avenue, Harwell, Didcot, Oxfordshire, OX11 0SG. T 01235 822200.
Okay. Which file do I put that in? Thanks. Marc Beaumont Network Admin / Linux Specialist Comms 365 marc.beaumont@comms365.com -----Original Message----- From: Freeradius-Users [mailto:freeradius-users-bounces+marc.beaumont=comms365.com@lists.freeradius.org] On Behalf Of Stefan Paetow Sent: 03 June 2015 13:10 To: FreeRadius users mailing list Subject: Re: Variables in clients.conf and user config.
Tunnel-Server-Endpoint = <client IP>, (Want to base this on the client the request came from, eg just lift the ipaddr attribute) Tunnel-Password = xxxxxxx,
Is this possible??
No, but you can use unlang to provide that information in the post-auth section: Update reply { Tunnel-Server-Endpoint := "%{client:ipaddr}" } :-) Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc¹s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800. Jisc Collections and Janet Ltd. is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under Company No. number 2881024, VAT No. GB 197 0632 86. The registered office is: Lumen House, Library Avenue, Harwell, Didcot, Oxfordshire, OX11 0SG. T 01235 822200.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Okay. Which file do I put that in?
Either in the sites-available/inner-tunnel or sites-available/default file... Probably the latter. Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc¹s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800. Jisc Collections and Janet Ltd. is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under Company No. number 2881024, VAT No. GB 197 0632 86. The registered office is: Lumen House, Library Avenue, Harwell, Didcot, Oxfordshire, OX11 0SG. T 01235 822200.
That's great thanks. Got that working okay. Marc Beaumont Network Admin / Linux Specialist Comms 365 marc.beaumont@comms365.com -----Original Message----- From: Freeradius-Users [mailto:freeradius-users-bounces+marc.beaumont=comms365.com@lists.freeradius.org] On Behalf Of Stefan Paetow Sent: 03 June 2015 13:43 To: FreeRadius users mailing list Subject: Re: Variables in clients.conf and user config.
Okay. Which file do I put that in?
Either in the sites-available/inner-tunnel or sites-available/default file... Probably the latter. Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc¹s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800. Jisc Collections and Janet Ltd. is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under Company No. number 2881024, VAT No. GB 197 0632 86. The registered office is: Lumen House, Library Avenue, Harwell, Didcot, Oxfordshire, OX11 0SG. T 01235 822200. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Marc Beaumont -
Stefan Paetow