设为首页 收藏本站
查看: 564|回复: 0

[经验分享] netscreen webauth with windows ad account and group via freeradius-11762130

[复制链接]
YunVN网友  发表于 2018-6-20 07:10:59 |阅读模式
  author contact: shezho@gmail.com
  I got a task to integrate our corp windows AD  with our netscreen firewall webauth function. before this our firewall supports only
  local users, that causes big work  load to create accounts especially when the user number grows more and more.
  To use windows AD, ldap firstly comes into mind but soon I found it’s not usable as I even can’t find where to define the ldap search account and password. As I know on SRX this will work quite well and simply by using ldap to interconnect with windows AD from firewall.
  Then I consider netscreen+ radius+windows AD. it’s easy to find a lot of articles about using IAS to achieve this, but it doesn’t work for me
  as it requires to install IAS on windows AD, as I am not authorized to do that.
  then I figureout the way netscreen+freeradius+ windows AD as below.
  1. install freeradius:
  yum install freeradius freeradius-ldap
  you may need install epel before this if you haven’t done:
  yum install epel-release
  2. config freeradius:
  a. Edit /etc/raddb/clients.conf
  add netscreen as the client of freeradius:
  .....
  client <your_netscreen_IP> {
  secret = <your secretkey>
  nastype = other
  }
  ......
  b. edit /etc/raddb/modules/ldap
  At the beginning of radius to use ldap to authenticate a user, it will send a bind firstly with the search account, then it search the account of the user to be webauthed, and then it bind this webauth user account. if each step succeeds, radius reply access accept to netscreen.
  so we have to provide the config file with a search account and some information of the webauth account such as the base DN.
  Define your ldap server as the windows AD server as below
  including the ldap search account(identity+ password) information:
  ......
  ldap {
  #
  #  Note that this needs to match the name in the LDAP
  #  server certificate, if you're using ldaps.
  server = <your windows ad server ip>

  >  password = <password of user admin>
  basedn = "ou=test,dc=test,dc=com"
  filter = "(cn=%{%{Stripped-User-Name}:-%{User-Name}})"
  #base_filter = "(objectclass=radiusprofile)"
  .......
  c. /etc/raddb/sites-available/default
  enable the ldap authentication in default file by uncomment the ldap line in different sections at least in auth section.
  d.edit the attribute map file  /etc/raddb/ldap.attrmap
  add below line:
  replyItemNS-User-Group                   memberOf
  or:
  replyItemNS-User-Group                   memberOf        +=
  The difference between the two lines is there is operators “+=” in the second line, which is used when the user belongs to more than one group and you want
  all the group information to be replied to the netscreen. normally this operator is used for multi-valued attributes.
  3. config netscreen:
  a. set radius server information
  set auth-server "my_radius">
  set auth-server "my_radius" server-name <put your free radius ip address here>
  set auth-server "my_radius" radius port 1812
  set auth-server "my_radius" radius secret <your radius secret key>
  set auth radius accounting port 1646
  b. config web auth:
  set webauth server "my_radius"
  set interface "ethernet5/3" webauth
  set interface "ethernet5/3" webauth-ip <your netscreen ip used for webauth>
  set webauth server "my_radius"
  c. config user group information, the group name should be the same as user group information defined on windows AD.
  user group information on AD is described in memberOf attribute.
  set user-group "CN=group1,OU=test,DC=test" type auth
  set user-group "CN=group2,OU=test,DC=test" type auth
  d. define the policy which allows the specific group to access the resource:
  set policy>
  this allows user in the group1 to access server1 from host1 after the user passes the web authentication at the web page: http://<your netscreen ip used for webauth>

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-526046-1-1.html 上篇帖子: windows相关 下篇帖子: SQL server 2012 如何删除数据库
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表