dynamic client

mohamed almeshal mohammed.almeshal at hotmail.com
Sun Nov 3 09:59:57 UTC 2024


dear all
this config file for dynamic client work fine without any problems but my goal is to accept any connection from any nas I try to do * in ipaddr but didn't work
also I try it with listen part but also not work

  # SQL_LISTEN_CONFIG_START
listen {
    type = auth
    port = 1812
    ipaddr = *
    proto = udp
    limit {
        max_pps = 1000
    }
}

listen {
    type = acct
    port = 1813
    ipaddr = *
    proto = udp
    limit {
        max_pps = 1000
    }
}
  # SQL_LISTEN_CONFIG_END



client dynamic {

 # CLIENT_IPADDR_START
    ipaddr = 0.0.0.0/0
 # CLIENT_IPADDR_END

    dynamic_clients = dynamic_clients

    lifetime = 1

}

server dynamic_clients {

    authorize {

        if ("%{sql: SELECT nasname FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}") {
            update control {
                &FreeRADIUS-Client-IP-Address = "%{Packet-Src-IP-Address}"
                &FreeRADIUS-Client-Require-MA = no
                &FreeRADIUS-Client-Shortname = "%{sql: SELECT shortname FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
                &FreeRADIUS-Client-Secret = "%{sql: SELECT secret FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
                &FreeRADIUS-Client-NAS-Type = "%{sql: SELECT type FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
                &FreeRADIUS-Client-Virtual-Server = "%{sql: SELECT server FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
            }
            ok
        }
    }
}





More information about the Freeradius-Users mailing list