Skip to main content

Freeradius 2fa with ldap and google

root@zabbix:/usr/local/etc/raddb/sites-enabled# more my_server

server my_server {
listen {
        type = auth
        ipaddr = *
        port = 1812
}
authorize {
        filter_uuid
        filter_google_otp
        ldap
        if (ok || updated)  {
        update control {
        Auth-Type := LDAP
        }
        }
}
authenticate {
        Auth-Type LDAP {
                ldap
        }
}
}

ldap conf

ldap {
   
    identity = 'CN=freeradius_svc,OU=Service_accounts,DC=migrosonline,DC=com'
    password = 'Cumartesi2023.'

  
    base_dn = 'OU=ADoutVPNusers,DC=migrosonline,DC=com'
    
    user {
         base_dn = 'OU=ADoutVPNusers,DC=migrosonline,DC=com'
         filter = "(sAMAccountName=%{%{Stripped-User-Name}:-%{User-Name}})" 
         control:My_Group = 'memberOf' 
         }


  
  }