Calling station id has SSID in it
Hi all, Not a freeradius question but .... Someone out on eduroam has got their wireless mobility controller set up to include the SSID in their calling-station-id attribute that gets passed back to us. e.g. radius.log.30.gz:Mon May 16 19:12:59 2016 : Auth: (19885) Login OK: [ sgvk500@york.ac.uk] (from client roaming0.ja.net port 9 cli 98-b8-e3-65-72-fc;eduroam) This is on FR 3.0.12 I've changed the postgresql column definition for calling-station-id to be of type macaddr from varchar. As a result insert statements are getting rejected. What's an easy way of stripping out the ;eduroam but and making both postgresql and our db manager happy? Rgds Alex
What's an easy way of stripping out the ;eduroam but and making both postgresql and our db manager happy?
Unlang, Alex. :-) Do a regex to split the calling station ID at a ';', then reassign the first group to the attribute (or a temporary one). Then process as usual. :-) 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.
:-)) Thx A On 15 June 2016 at 13:41, Stefan Paetow <Stefan.Paetow@jisc.ac.uk> wrote:
What's an easy way of stripping out the ;eduroam but and making both postgresql and our db manager happy?
Unlang, Alex. :-)
Do a regex to split the calling station ID at a ';', then reassign the first group to the attribute (or a temporary one). Then process as usual.
:-)
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.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 15 Jun 2016, at 08:56, Alex Sharaz <alex.sharaz@york.ac.uk> wrote:
:-)) Thx A
There's a policy included with the server to do just that... Maybe submit a PR to change the last : to a [:;]? :) Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
On Wed, Jun 15, 2016 at 09:09:31AM -0400, Arran Cudbard-Bell wrote:
On 15 Jun 2016, at 08:56, Alex Sharaz <alex.sharaz@york.ac.uk> wrote:
:-)) Thx A
There's a policy included with the server to do just that... Maybe submit a PR to change the last : to a [:;]? :)
It already skips any non-hex char as separator... so just include rewrite_called_station_id in authorize and the SSID should be split off into Called-Station-SSID and the Called-Station-Id should be in uppercase AA-BB-CC-DD-EE-FF format :-) Matthew -- 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>
Yup that worked .... unfortunately ....... for the kind person who has set the called station id to be "172.20.87.56" it doesn't really help.:-(( On 15 June 2016 at 14:21, Matthew Newton <mcn4@leicester.ac.uk> wrote:
On Wed, Jun 15, 2016 at 09:09:31AM -0400, Arran Cudbard-Bell wrote:
On 15 Jun 2016, at 08:56, Alex Sharaz <alex.sharaz@york.ac.uk> wrote:
:-)) Thx A
There's a policy included with the server to do just that... Maybe
submit a PR to change the last : to a [:;]? :)
It already skips any non-hex char as separator...
so just include
rewrite_called_station_id
in authorize and the SSID should be split off into Called-Station-SSID and the Called-Station-Id should be in uppercase AA-BB-CC-DD-EE-FF format :-)
Matthew
-- 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> - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Guess I could always strip out the called station id A On 15 June 2016 at 15:31, Alex Sharaz <alex.sharaz@york.ac.uk> wrote:
Yup that worked .... unfortunately ....... for the kind person who has set the called station id to be "172.20.87.56" it doesn't really help.:-((
On 15 June 2016 at 14:21, Matthew Newton <mcn4@leicester.ac.uk> wrote:
On Wed, Jun 15, 2016 at 09:09:31AM -0400, Arran Cudbard-Bell wrote:
On 15 Jun 2016, at 08:56, Alex Sharaz <alex.sharaz@york.ac.uk> wrote:
:-)) Thx A
There's a policy included with the server to do just that... Maybe
submit a PR to change the last : to a [:;]? :)
It already skips any non-hex char as separator...
so just include
rewrite_called_station_id
in authorize and the SSID should be split off into Called-Station-SSID and the Called-Station-Id should be in uppercase AA-BB-CC-DD-EE-FF format :-)
Matthew
-- 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> - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 15 Jun 2016, at 10:50, Alex Sharaz <alex.sharaz@york.ac.uk> wrote:
Guess I could always strip out the called station id
Last time I checked 32 was less than 48 :) -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
You pad it with leading 00's But maybe best to use attr_filter - if it's a mac address then allow it. Else dump it. alan
Hi,
Yup that worked .... unfortunately ....... for the kind person who has set the called station id to be "172.20.87.56" it doesn't really help.:-((
calling-station-id needs to be a MAC - called-station should be a MAC but some NAS devices may be configured for other random values - such as the IP of the called-station..... you cannot assume its a MAC address.... if you do you COULD convert it to a pseudo-MAC if you really need/want to alan
calling-station-id needs to be a MAC -
You I know
called-station should be a MAC but some NAS devices may be configured for other random values - such as the IP of the called-station..... you cannot assume its a MAC address.... if you do you COULD convert it to a pseudo-MAC if you really need/want to
Just haven't seen this before. iI'll work something out A On 15 June 2016 at 15:53, <A.L.M.Buxey@lboro.ac.uk> wrote:
Hi,
Yup that worked .... unfortunately ....... for the kind person who has set the called station id to be "172.20.87.56" it doesn't really help.:-((
calling-station-id needs to be a MAC -
called-station should be a MAC but some NAS devices may be configured for other random values - such as the IP of the called-station..... you cannot assume its a MAC address.... if you do you COULD convert it to a pseudo-MAC if you really need/want to
alan
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Sigh! Yup I know On 15 June 2016 at 16:19, Alex Sharaz <alex.sharaz@york.ac.uk> wrote:
calling-station-id needs to be a MAC -
You I know
called-station should be a MAC but some NAS devices may be configured for other random values - such as the IP of the called-station..... you cannot assume its a MAC address.... if you do you COULD convert it to a pseudo-MAC if you really need/want to
Just haven't seen this before. iI'll work something out A
On 15 June 2016 at 15:53, <A.L.M.Buxey@lboro.ac.uk> wrote:
Hi,
Yup that worked .... unfortunately ....... for the kind person who has set the called station id to be "172.20.87.56" it doesn't really help.:-((
calling-station-id needs to be a MAC -
called-station should be a MAC but some NAS devices may be configured for other random values - such as the IP of the called-station..... you cannot assume its a MAC address.... if you do you COULD convert it to a pseudo-MAC if you really need/want to
alan
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Wed, Jun 15, 2016 at 04:19:44PM +0100, Alex Sharaz wrote:
called-station should be a MAC but some NAS devices may be configured for other random values - such as the IP of the called-station..... you cannot assume its a MAC address.... if you do you COULD convert it to a pseudo-MAC if you really need/want to
Just haven't seen this before. iI'll work something out
Oh, we see all sorts of crap coming from other eduroam sites. Just try and sort it to something standard if possible (i.e. canonicalise MAC addresses), then log it as-is. It's mostly a waste of time trying to do any more IMO. Called-Station-Id doesn't really mean anything to you from a remote site unless you need to report something to them, then you can just quote it back verbatim. Matthew -- 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>
Yup did wonder how useful the called address would be from a remote site A Sent from my iPhone 6 plus
On 15 Jun 2016, at 16:39, Matthew Newton <mcn4@leicester.ac.uk> wrote:
On Wed, Jun 15, 2016 at 04:19:44PM +0100, Alex Sharaz wrote:
called-station should be a MAC but some NAS devices may be configured for other random values - such as the IP of the called-station..... you cannot assume its a MAC address.... if you do you COULD convert it to a pseudo-MAC if you really need/want to
Just haven't seen this before. iI'll work something out
Oh, we see all sorts of crap coming from other eduroam sites.
Just try and sort it to something standard if possible (i.e. canonicalise MAC addresses), then log it as-is. It's mostly a waste of time trying to do any more IMO. Called-Station-Id doesn't really mean anything to you from a remote site unless you need to report something to them, then you can just quote it back verbatim.
Matthew
-- 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> - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (6)
-
A.L.M.Buxey@lboro.ac.uk -
Alan Buxey -
Alex Sharaz -
Arran Cudbard-Bell -
Matthew Newton -
Stefan Paetow