HOW TO CHANGE PUBLIC IP RANDOMLY EVERY TIME USER CONNECT.

Zubair Ayub Zubairayub at hotmail.com
Fri Sep 23 13:33:43 CEST 2016


sir here you assign only one pool against one user what if i want to assign multiple pools to that user?

________________________________
From: Freeradius-Users <freeradius-users-bounces+zubairayub=hotmail.com at lists.freeradius.org> on behalf of Aurélio de Souza Ribeiro Neto <netolistas at mpc.com.br>
Sent: Thursday, September 22, 2016 2:04:03 PM
To: FreeRadius users mailing list
Subject: Re: HOW TO CHANGE PUBLIC IP RANDOMLY EVERY TIME USER CONNECT.

Zubair,

     I use this structure on MySQL for Mikrotik Nas, and FreeRadius
2.2.9, and it's only begin for solution:

     radcheck:

+------+-------------+------------------+----+---------------+
| id   | username    | attribute        | op | value    |
+------+-------------+------------------+----+---------------+
| 3540 | testepppoe2 | Simultaneous-Use | := | 1     |
| 3541 | testepppoe2 | Pool-Name        | := | main_pool     |
| 3542 | testepppoe2 | User-Password    | := | userpassword  |
+------+-------------+------------------+----+---------------+

     radusergroup:

+-------------+-----------+----------+
| username    | groupname | priority |
+-------------+-----------+----------+
| testepppoe2 | 717       |        1 |
+-------------+-----------+----------+

     radgroupreply:

+----+-----------+---------------------+----+----------------------------------------------+
| id | groupname | attribute           | op |
value                                        |
+----+-----------+---------------------+----+----------------------------------------------+
| 56 | 717       | Framed-Compression  | := |
Van-Jacobsen-TCP-IP                          |
| 57 | 717       | Framed-Protocol     | := |
PPP                                          |
| 58 | 717       | Framed-Routing      | := |
Broadcast-Listen                             |
| 59 | 717       | Framed-MTU          | := |
1500                                         |
| 60 | 717       | Service-Type        | := |
Framed-User                                  |
| 61 | 717       | Mikrotik-Rate-Limit | := | 1024k/4096k 1126k/11264k
1075k/8192k 108/108 |
+----+-----------+---------------------+----+----------------------------------------------+

     radippool:
+-----+-----------+-----------------+--------------+-----------------+------------------+---------------------+----------+----------+
| id  | pool_name | framedipaddress | nasipaddress | calledstationid |
callingstationid | expiry_time         | username | pool_key |
+-----+-----------+-----------------+--------------+-----------------+------------------+---------------------+----------+----------+
| 509 | main_pool | 123.123.123.123 | |
|                  | 0000-00-00 00:00:00 |          | 0        |
+-----+-----------+-----------------+--------------+-----------------+------------------+---------------------+----------+----------+

     nas:

+----+---------------+-------------+----------+-------+----------+--------+-----------+---------------------------+
| id | nasname       | shortname   | type     | ports | secret   |
server | community | description               |
+----+---------------+-------------+----------+-------+----------+--------+-----------+---------------------------+
|  0 | 127.0.0.1     | Local Host  | other    |  NULL | nassecret|
NULL   | NULL      | RADIUS Client             |
|  1 | 172.20.30.2   | ce-poppa-rb | mikrotik |  1812 | nassecret|
NULL   | NULL      | COND. CDHU PADRE ANCHIETA |
|  2 | 172.20.200.22 | ce-teste-rb | mikrotik |  1812 | nassecret|
NULL   | NULL      | TESTE PPPoE               |
+----+---------------+-------------+----------+-------+----------+--------+-----------+---------------------------+



Em 22/09/2016 10:07, Zubair Ayub escreveu:
> i have multiple nas servers so if you can give be all steps than i will
>
> be very thankful to you
>
> ________________________________
> From: Freeradius-Users <freeradius-users-bounces+zubairayub=hotmail.com at lists.freeradius.org> on behalf of khouzam yaghi <khouzam.yaghi at gmail.com>
> Sent: Thursday, September 22, 2016 12:02:33 PM
> To: FreeRadius users mailing list
> Subject: Re: HOW TO CHANGE PUBLIC IP RANDOMLY EVERY TIME USER CONNECT.
>
> YOU NEED TO USE sqlippool as i told you! and also u MUST store the ips in
> radippool table and then in radgroupreply you assign each group to a
> specific pool-name you already stored in radippool
>
> K. Yaghi
>
> On Thu, Sep 22, 2016 at 2:51 PM, Zubair Ayub <Zubairayub at hotmail.com> wrote:
>
>> thanks Aurélio de Souza Ribeiro Neto but i have these query in my ippool
>> confg file and i am not using this file and also i have stored my ips in
>> radgroup reply table not in rapippool.
>>
>> regards
>>
>> zubair ayub
>>
>>
>> ________________________________
>> From: Freeradius-Users <freeradius-users-bounces+zubairayub=
>> hotmail.com at lists.freeradius.org> on behalf of Aurélio de Souza Ribeiro
>> Neto <netolistas at mpc.com.br>
>> Sent: Thursday, September 22, 2016 11:19:03 AM
>> To: FreeRadius users mailing list
>> Subject: Re: HOW TO CHANGE PUBLIC IP RANDOMLY EVERY TIME USER CONNECT.
>>
>> Zubair,
>>
>>       In your SQL conf file you have a Query Sample to do Randomly or not.
>>
>>       Take a look:
>>
>> ## The ORDER BY clause of this query tries to allocate the same IP-address
>> ## which user had last session...
>> allocate-find = "SELECT framedipaddress FROM ${ippool_table} \
>>    WHERE pool_name = '%{control:Pool-Name}' AND (expiry_time < NOW() OR
>> expiry_time = '0000-00-00 00:00:00') \
>>    ORDER BY (username <> '%{User-Name}'), \
>>    (callingstationid <> '%{Calling-Station-Id}'), \
>>    expiry_time \
>>    LIMIT 1 \
>>    FOR UPDATE"
>>
>> # ## If you prefer to allocate a random IP address every time, i
>> # ## use this query instead
>> # allocate-find = "SELECT framedipaddress FROM ${ippool_table} \
>> # WHERE pool_name = '%{control:Pool-Name}' \
>> #  AND expiry_time = '0000-00-00 00:00:00'  \
>> #  ORDER BY RAND() \
>> #  LIMIT 1 \
>> #  FOR UPDATE"
>>
>>
>>
>>
>> Em 22/09/2016 07:40, Zubair Ayub escreveu:
>>> i tried alot but didnt get result may be i am asking wrong quesion .
>>>
>>> i have ips in my mikrotik name as all ips
>>>
>>> then i have stored in my radgroupreply table with name all ips
>>>
>>> now my pppoe dailer user get same  public ip everytime
>>>
>>> and every thing works fine
>>>
>>> but i am that my user should get different ip everytime.
>>>
>>> thanks
>>>
>>> regards
>>>
>>> zubair ayub
>>>
>>> ________________________________
>>> From: Freeradius-Users <freeradius-users-bounces+zubairayub=
>> hotmail.com at lists.freeradius.org> on behalf of Alan DeKok <
>> aland at deployingradius.com>
>>> Sent: Saturday, September 10, 2016 12:59:50 PM
>>> To: FreeRadius users mailing list
>>> Subject: Re: HOW TO CHANGE PUBLIC IP RANDOMLY EVERY TIME USER CONNECT.
>>>
>>> On Sep 10, 2016, at 8:47 AM, Zubair Ayub <Zubairayub at hotmail.com> wrote:
>>>> now i dont know why my ippool file is not working i am really very weak
>> in radius sorry for asking stupid questions
>>>     Read the ippool documentation and follow the examples.
>>>
>>>     Alan DeKok.
>>>
>>>
>>> -
>>> List info/subscribe/unsubscribe? See http://www.freeradius.org/
>> list/users.html
>>> -
>>> List info/subscribe/unsubscribe? See http://www.freeradius.org/
>> list/users.html
>>
>>
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/
>> list/users.html
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/
>> list/users.html
>>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html




-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list