How to change request attribute based on NAS IP address

Mehdi Ravanbakhsh babakco at gmail.com
Wed Apr 24 15:10:33 CEST 2013


Dear
Giuseppe Marocchio

it works  :)

thanks.




On Wed, Apr 24, 2013 at 11:15 AM, Giuseppe Marocchio <giuseppe at marocchio.com
> wrote:

> Hello, is simple & stupid.
>
>
>          if (Cisco-AVpair =~ /^client-mac-address=([a-f0-9]**
> [a-f0-9])([a-f0-9][a-f0-9]).([**a-f0-9][a-f0-9])([a-f0-9][a-**
> f0-9]).([a-f0-9][a-f0-9])([a-**f0-9][a-f0-9])$/) {
>                  if (!Calling-Station-Id) {
>                             update request {
>                                     Calling-Station-Id :=
> "%{1}:%{2}:%{3}:%{4}:%{5}:%{6}**"
>                                     Called-Station-Id := "%{NAS-Port-Id}"
>                             }
>
>                  }
>         }
>
>
>
>
> Il 23/04/13 23.49, Mehdi Ravanbakhsh ha scritto:
>
>> Hi All
>>
>> i use Cisco and mikrotik as Access server in my network  and i need to
>> limit user access by MAC address.
>>
>> in this case i can use Calling-Station-Id , it works for mikrotik  :
>> AUTH Detail
>>
>>          Packet-Type = Access-Request
>>         Service-Type = Framed-User
>>         Framed-Protocol = PPP
>>         NAS-Port = 11062419
>>         NAS-Port-Type = Ethernet
>>         User-Name = "7622240489"
>>         Calling-Station-Id = "90:F6:52:D5:74:96"
>>         Called-Station-Id = "EHO-L"
>>         NAS-Port-Id = "902- ADSL-EMAM-HOSIEN"
>>         NAS-Identifier = "2800gs-langha"
>>         NAS-IP-Address = 10.185.3.5
>>         SQL-User-Name = "7622240489"
>>
>>
>> But not work for Cisco :
>>
>>          Packet-Type = Access-Request
>>         Cisco-AVPair = "client-mac-address=9094.e483.**390b"
>>         Framed-Protocol = PPP
>>         User-Name = "5858222251"
>>         NAS-Port-Type = Ethernet
>>         NAS-Port = 13145502
>>         NAS-Port-Id = "0/0/2/352"
>>         Service-Type = Framed-User
>>         NAS-IP-Address = 85.185.83.242
>>         Acct-Session-Id = "00C8959E"
>>         NAS-Identifier = "BOJNOORD_7204_1"
>>         SQL-User-Name = "5858222251"
>>
>>
>> So how i can  Set calling station ID to MAC addreess for cisco NAS ?
>>
>>
>> Best regards.
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/**
>> list/users.html <http://www.freeradius.org/list/users.html>
>>
>
>
> --
> Giuseppe Marocchio
> http://www.marocchio.com
> Tel: (+39) 045.8538888
> Fax: (+39) 045.5111197
> skype: giuseppe.marocchio
>
>  **** Riservatezza / Confidentiality ****
> In ottemperanza al D.L. n. 196 del 30/6/2003 in materia di protezione dei
> dati personali,
> le informazioni contenute in questo messaggio sono strettamente riservate
> ed esclusivamente
> indirizzate al destinatario indicato (oppure alla persona responsabile di
> rimetterlo al
> destinatario). Vogliate tener presente che qualsiasi uso, riproduzione o
> divulgazione di questo
> messaggio è vietato. Nel caso in cui aveste ricevuto questo messaggio per
> errore, vogliate
> cortesemente avvertire il mittente e distruggere il presente messaggio.
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/**
> list/users.html <http://www.freeradius.org/list/users.html>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130424/e87e76e9/attachment.html>


More information about the Freeradius-Users mailing list