HOW TO CHANGE PUBLIC IP RANDOMLY EVERY TIME USER CONNECT.
Aurélio de Souza Ribeiro Neto
netolistas at mpc.com.br
Thu Sep 22 13:19:03 CEST 2016
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
More information about the Freeradius-Users
mailing list