Virtual Server

Kev Pearce email.me at kevp.com
Mon Sep 8 11:03:50 CEST 2014


I was just about to post to the list about the same issue!

 

> Failed to find virtual server rif

 

I’m getting the same issue using the latest v2.x.x branch from Github with Alan’s fix for the loading clients into virtual servers from SQL issue. (Possible connection? I think the fix was also pulled into the v3.0.4 branch too…)

 

rlm_sql (sql): Processing generate_sql_clients

rlm_sql (sql) in generate_sql_clients: query is SELECT id, nasname, shortname, type, secret, server FROM nas

rlm_sql (sql): Reserving sql socket id: 4

rlm_sql_mysql: query:  SELECT id, nasname, shortname, type, secret, server FROM nas

rlm_sql (sql): Read entry nasname=128.0.0.0/1,shortname=upper,secret=testing1

rlm_sql (sql): Adding client 128.0.0.0 (upper, server=vs3001) to clients list

Failed to find virtual server vs3001

rlm_sql (sql): Released sql socket id: 4

rlm_sql (sql): Failed to add client 128.0.0.0 (upper) to clients list.  Maybe there's a duplicate?

Failed to load clients from SQL.

 

I also tried two static defined clients same name and IP pointing to different virtual servers and got:

 

Sun Sep  7 02:41:06 2014 : Debug: radiusd: #### Loading Realms and Home Servers ####

Sun Sep  7 02:41:06 2014 : Debug: radiusd: #### Loading Clients ####

Sun Sep  7 02:41:06 2014 : Debug:  client 1.1.1.1 {

Sun Sep  7 02:41:06 2014 : Debug:       ipaddr = 1.1.1.1

Sun Sep  7 02:41:06 2014 : Debug:       require_message_authenticator = no

Sun Sep  7 02:41:06 2014 : Debug:       secret = "testing1"

Sun Sep  7 02:41:06 2014 : Debug:       virtual_server = "vs3001"

Sun Sep  7 02:41:06 2014 : Debug:  }

Sun Sep  7 02:41:06 2014 : Debug:  client 1.1.1.1 {

Sun Sep  7 02:41:06 2014 : Debug:       ipaddr = 1.1.1.1

Sun Sep  7 02:41:06 2014 : Debug:       require_message_authenticator = no

Sun Sep  7 02:41:06 2014 : Debug:       secret = "testing2"

Sun Sep  7 02:41:06 2014 : Debug:       virtual_server = "vs3002"

Sun Sep  7 02:41:06 2014 : Debug:  }

Sun Sep  7 02:41:06 2014 : Error: Failed to add duplicate client 1.1.1.1

Sun Sep  7 02:41:06 2014 : Error: /etc/freeradius/radiusd.conf[216]: Failed to add client 1.1.1.1

Sun Sep  7 02:41:06 2014 : Debug: Failed to load clients

 

It’s as if its loading the clients before the virtual servers and therefore has no knowledge of them.

 

I then tried putting the statically defined clients inside each of the virtual server blocks and this loads fine:

 

} # server

server vs3001 { # from file /etc/freeradius/radiusd.conf

modules {

Module: Checking authenticate {...} for more modules to load

Module: Checking authorize {...} for more modules to load

} # modules

} # server

server vs3002 { # from file /etc/freeradius/radiusd.conf

modules {

Module: Checking authenticate {...} for more modules to load

Module: Checking authorize {...} for more modules to load

} # modules

} # server

radiusd: #### Opening IP addresses and Ports ####

listen {

        type = "control"

listen {

        socket = "/var/run/freeradius/freeradius.sock"

        mode = "rw"

}

}

listen {

        type = "auth"

        ipaddr = *

        port = 3001

  client dynamic_all_3001 {

        ipaddr = 0.0.0.0

        netmask = 0

        require_message_authenticator = no

        dynamic_clients = "dynamic_client_server"

        lifetime = 3600

  }

  client 1.1.1.1 {

        ipaddr = 1.1.1.1

        require_message_authenticator = no

        secret = "testing1"

  }

}

listen {

        type = "auth"

        ipaddr = *

        port = 3002

  client dynamic_all_3002 {

        ipaddr = 0.0.0.0

        netmask = 0

        require_message_authenticator = no

        dynamic_clients = "dynamic_client_server"

        lifetime = 3600

  }

  client 1.1.1.1 {

        ipaddr = 1.1.1.1

        require_message_authenticator = no

        secret = "testing2"

  }

}

Listening on command file /var/run/freeradius/freeradius.sock

Listening on authentication address * port 3001 as server vs3001

Listening on authentication address * port 3002 as server vs3002

Ready to process requests.

 

Hope this helps,

 

Cheers

 

Kev/.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140908/9b453c02/attachment-0001.html>


More information about the Freeradius-Users mailing list