ip address manipulation

tnt at kalik.net tnt at kalik.net
Tue Sep 23 18:37:05 CEST 2008


>I'm wondering what would be the best method do to math on IP addresses. I
>want to build my returned ip address based on the username and the NAS IP
>address.
>The NAS IP is simply a mapping from the source ip to a number Z
>The layout of the username is: userX at Y.com
>
>The resulting IP address would then be 2Z.Y.X (where X is converted from a
>number to the last two subnets of the ip address)
..
>Do I need to use an external script for this? What would you recommend?

I would recommend that you run the script just once and populate your
database/users file with required user-NAS-IP combinations.

Ivan Kalik
Kalik Informatika ISP




More information about the Freeradius-Users mailing list