This is a simple question but I can't find the answer by searching. In the following rad_recv block, which variable contains the value "137.222.7.113"? I need to access it in unlang to determine whether the packet arrived at my RADIUS server from our wireless controllers, or from another RADIUS server. Thanks, Jonathan rad_recv: Access-Request packet from host 137.222.7.113 port 53538, id=93, length=179 User-Name = "@bris.ac.uk" Calling-Station-Id = "20:10:7a:1a:89:1d" Called-Station-Id = "d0:c2:82:ae:ad:00:eduroam" NAS-IP-Address = 172.17.107.201 NAS-Identifier = "wism1@bristol.ac.uk" Framed-MTU = 1300 Operator-Name = "1bristol.ac.uk"
On 17 Oct 2013, at 15:17, Jonathan Gazeley <Jonathan.Gazeley@bristol.ac.uk> wrote:
This is a simple question but I can't find the answer by searching. In the following rad_recv block, which variable contains the value "137.222.7.113"? I need to access it in unlang to determine whether the packet arrived at my RADIUS server from our wireless controllers, or from another RADIUS server.
Thanks, Jonathan
rad_recv: Access-Request packet from host 137.222.7.113 port 53538, id=93, length=179 User-Name = "@bris.ac.uk" Calling-Station-Id = "20:10:7a:1a:89:1d" Called-Station-Id = "d0:c2:82:ae:ad:00:eduroam" NAS-IP-Address = 172.17.107.201 NAS-Identifier = "wism1@bristol.ac.uk" Framed-MTU = 1300 Operator-Name = "1bristol.ac.uk"
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
%{request:Client-IP-Address}
On Thu, Oct 17, 2013 at 03:17:09PM +0100, Jonathan Gazeley wrote:
This is a simple question but I can't find the answer by searching. In the following rad_recv block, which variable contains the value "137.222.7.113"? I need to access it in unlang to determine whether the packet arrived at my RADIUS server from our wireless controllers, or from another RADIUS server.
It's a virtual attribute - use Packet-Src-IP-Address or Client-IP-Address. Should be able to test it in unlang. If you need to test it in users or huntgroups file which only test real attributes then you'll need to use unlang to copy it to the control list at the top of the authorize section before the call to files/preprocess. Matthew
rad_recv: Access-Request packet from host 137.222.7.113 port 53538, id=93, length=179 User-Name = "@bris.ac.uk" Calling-Station-Id = "20:10:7a:1a:89:1d" Called-Station-Id = "d0:c2:82:ae:ad:00:eduroam" NAS-IP-Address = 172.17.107.201 NAS-Identifier = "wism1@bristol.ac.uk" Framed-MTU = 1300 Operator-Name = "1bristol.ac.uk"
-- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
Hi,
On Thu, Oct 17, 2013 at 03:17:09PM +0100, Jonathan Gazeley wrote:
This is a simple question but I can't find the answer by searching. In the following rad_recv block, which variable contains the value "137.222.7.113"? I need to access it in unlang to determine whether the packet arrived at my RADIUS server from our wireless controllers, or from another RADIUS server.
It's a virtual attribute - use Packet-Src-IP-Address or Client-IP-Address.
if you have nicely defined shortnames in your clients.conf you can also use %{client:shortname} too ... eg if (%{client:shortname} != "NRPS") { blah blah } etc etc alan
On 17 Oct 2013, at 18:58, <A.L.M.Buxey@lboro.ac.uk> wrote:
Hi,
On Thu, Oct 17, 2013 at 03:17:09PM +0100, Jonathan Gazeley wrote:
This is a simple question but I can't find the answer by searching. In the following rad_recv block, which variable contains the value "137.222.7.113"? I need to access it in unlang to determine whether the packet arrived at my RADIUS server from our wireless controllers, or from another RADIUS server.
It's a virtual attribute - use Packet-Src-IP-Address or Client-IP-Address.
if you have nicely defined shortnames in your clients.conf you can also use
%{client:shortname} too ...
eg
if (%{client:shortname} != "NRPS") { blah blah }
etc etc
you could shortcut that further if (%C != "NRPS") etc etc ;-)
On 17 Oct 2013, at 19:01, Scott Armitage <S.P.Armitage@LBORO.AC.UK> wrote:
On 17 Oct 2013, at 18:58, <A.L.M.Buxey@lboro.ac.uk> wrote:
Hi,
On Thu, Oct 17, 2013 at 03:17:09PM +0100, Jonathan Gazeley wrote:
This is a simple question but I can't find the answer by searching. In the following rad_recv block, which variable contains the value "137.222.7.113"? I need to access it in unlang to determine whether the packet arrived at my RADIUS server from our wireless controllers, or from another RADIUS server.
It's a virtual attribute - use Packet-Src-IP-Address or Client-IP-Address.
if you have nicely defined shortnames in your clients.conf you can also use
%{client:shortname} too ...
eg
if (%{client:shortname} != "NRPS") { blah blah }
etc etc
you could shortcut that further
if (%C != "NRPS")
etc etc
Except that's deprecated. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
On 17 Oct 2013, at 19:19, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 17 Oct 2013, at 19:01, Scott Armitage <S.P.Armitage@LBORO.AC.UK> wrote:
On 17 Oct 2013, at 18:58, <A.L.M.Buxey@lboro.ac.uk> wrote:
Hi,
On Thu, Oct 17, 2013 at 03:17:09PM +0100, Jonathan Gazeley wrote:
This is a simple question but I can't find the answer by searching. In the following rad_recv block, which variable contains the value "137.222.7.113"? I need to access it in unlang to determine whether the packet arrived at my RADIUS server from our wireless controllers, or from another RADIUS server.
It's a virtual attribute - use Packet-Src-IP-Address or Client-IP-Address.
if you have nicely defined shortnames in your clients.conf you can also use
%{client:shortname} too ...
eg
if (%{client:shortname} != "NRPS") { blah blah }
etc etc
you could shortcut that further
if (%C != "NRPS")
etc etc
Except that's deprecated.
Doh!!
participants (5)
-
A.L.M.Buxey@lboro.ac.uk -
Arran Cudbard-Bell -
Jonathan Gazeley -
Matthew Newton -
Scott Armitage