Multiple Database

Oscar Jofre oscar at jofre.com
Sun Jun 5 22:10:36 CEST 2016


Hi,

 

At the moment I’m using freeradius 3.0.10 to identify hotspot users from
over 400 mikrotiks.

It’s working fins but because all the routers are behind NAT IPS providers
some of them uses the same local IP (nasipaddress).

I’m trying to change this creating VPN tunnels from mikrotik to radius
server and assign unique IP to each hotspot mikrotik.

 

I will identify this VPN clients throw radius as well. I don’t want to use
the same database from hotspot users and VPN-routers so I will create a new
database and

change configuration to setup freeradius to use 2 database.

 

I will change on /mods-available/sql.conf to use sql hotspotdb {..}  and sql
vpndb {..} and pointing each one to a different database.

 

For the moment I only want to use vpndb to authentificate not accounting 


 

So on sites-available/default I should change sql to hotspotdb and vpndb
.

 

Here are my questions.

 

1)      I’ve seen on sites-available/default authorize section –sql, here is
where I have to change to

               –hotspotdb

               –vpndb ?

 

2)      On the other sections a have to change from –sql à to –hotspotdb ..
anywhere else ?

 

3)      This is most important how works authorization:

When trying to authorize always check both databases ? Or if the first
database return ok then doesn’t query the second one.

The best option will be with ULANG that I’m not really familiarized with 

how I can know if a auth query comes to query a hotspot user or a VPN user
.. maybe with nasipaddress or framedipaddress


So what I should write on authorize section:

               If {% nasipaddress ?? } then 

                               - hotspotdb

               Else

                               –vpndb

              End if

 

 

 

Thanks a lot !

 

 



More information about the Freeradius-Users mailing list