首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Freeradius + Authenticator + Google身份验证器

Freeradius + Authenticator + Google身份验证器
EN

Stack Overflow用户
提问于 2019-11-25 07:04:23
回答 1查看 2.3K关注 0票数 0

我一直试图让VPN用户使用2FA (Google身份验证器)进行身份验证。目前我有思科ISE,FreeRadius服务器,Active Directory。我想实现的是,当用户连接到VPN (Cisco ISE)时,服务器从Radius服务器请求用户,然后Radius服务器从Active对用户进行身份验证。如果用户身份验证成功,则FreeRadius服务器必须向用户请求OTP。我的配置是:/etc/raddb/sites-enabled/default

代码语言:javascript
复制
server default {
    listen {
        type = auth
        ipaddr = 1.1.1.1
        port = 0
        limit {
            max_connections = 16
            lifetime = 0
            idle_timeout = 30
        }
    }
    listen {
        ipaddr = *
        port = 0
        type = acct
    }
    authorize {
        filter_username
        preprocess
        chap
        mschap
        digest
        suffix
        eap {
            ok = return
        }
        files
        -sql
        ldap
        if ((ok || updated) && User-Password && !control:Auth-Type){
            update {
                control:Auth-Type := ldap
            }
        }
        expiration
        logintime
        pap
    }

    authenticate {
        Auth-Type PAP {
            pap
        }
        Auth-Type CHAP {
            chap
        }
        Auth-Type MS-CHAP {
            mschap
        }
        mschap
        digest
        Auth-Type LDAP {
            ldap
        }
        eap
    }
    preacct {
        preprocess
        acct_unique
        suffix
        files
    }
    accounting {
        detail
        unix
        -sql
        exec
        attr_filter.accounting_response
    }
    session {
    }
    post-auth {
        if (Google-Password) {
            update request {
                pam
            }
        }
        else {
            update reply {
                &Google-Password = "%{Google-Password}"
            }
        }
        update {
            &reply: += &session-state:
        }
        -sql
        exec
        remove_reply_message_if_eap
        Post-Auth-Type REJECT {
            -sql
            attr_filter.access_reject
            eap
            remove_reply_message_if_eap
        }
        Post-Auth-Type Challenge {
        }
    }
    pre-proxy {
    }
    post-proxy {
        eap
    }
}

/etc/raddb/clients.conf

代码语言:javascript
复制
client CISCO_ISE {
        ipaddr = 1.1.1.2
        proto = *
        secret = testing123
        require_message_authenticator = no
        nas_type         = other
        limit {
                max_connections = 16
                lifetime = 0
                idle_timeout = 30
        }
}

/etc/raddb/mods-config/files/authorize

代码语言:javascript
复制
DEFAULT Framed-Protocol == PPP
    Framed-Protocol = PPP,
    Framed-Compression = Van-Jacobson-TCP-IP

DEFAULT Hint == "CSLIP"
    Framed-Protocol = SLIP,
    Framed-Compression = Van-Jacobson-TCP-IP

DEFAULT Hint == "SLIP"
    Framed-Protocol = SLIP

/etc/pam.d/radiusd

代码语言:javascript
复制
auth            requisite       pam_google_authenticator.so forward_pass

使用此配置,FreeRadius服务器请求用户名和密码,但在广告认证后,服务器不需要一次密码

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-02-19 00:35:47

解决了这个问题。对于那些正在配置精确设置的人,您需要使用与会话或cookie相同的state attribute。如果请求有state attribute,那么将身份验证方法更改为PAM,这将检查令牌。否则,如果请求没有state attribute,那么第一次请求就需要通过Active Directory进行身份验证。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59026721

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档