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

[经验分享] 基于微软CA服务器为cisco路由器颁发证书

[复制链接]

尚未签到

发表于 2018-7-11 10:17:57 | 显示全部楼层 |阅读模式
DSC0000.png

  上篇文章说到用IOS路由器建立CA为***颁发证书验证,这次我们说下用微软的CA服务器为路由做证书认证
  前提:
  1.CA上开启IIS服务
  2.必须在win 2003 上安装Resource Kit Tools (PS:这工具在2003的安装光盘上是没有的,必须上微软官方网站下载.-----> http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en )
  3.路由器时间与CA AD同步
  4.安装完Resource Kit Tools 后,运行Command Shell--->输入cepsetup
DSC0001.png

DSC0002.png

DSC0003.png

  记着这个地址一会要用
DSC0004.png

  看见已经建立
DSC0005.png

  路由的配置
  r1(config)#ip domain name liang.com
  r1(config)#ip host contoso.com.local 202.1.100.102   AD的域名与ip
  r1(config)#crypto key generate rsa usage-keys
  The name for the keys will be: r1.liang.com

  Choose the>  Signature Keys. Choosing a key modulus greater than 512 may take
  a few minutes.
  How many bits in the modulus [512]: 1024

  Choose the>  Encryption Keys. Choosing a key modulus greater than 512 may take
  a few minutes.
  How many bits in the modulus [512]: 1024
  % Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
  % Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
  enrollment mode ra
  enrollment url http:202.1.100.102:80/certsrv/mscep/mscep.dll
  revocation-check crl
  r1(ca-trustpoint)#subject-name cn=r2 ou=cisco i=zhengzhou
  r1(config)#crypto pki authenticate 202.1.100.102
  Certificate has the following attributes:
  Fingerprint MD5: A3267F58 9A9EC6F7 B829A0B8 8CDC239F
  Fingerprint SHA1: 840B5626 DC206B25 D422C745 027BE178 D9E43920
  % Do you accept this certificate? [yes/no]: yes
  Trustpoint CA certificate accepted.
  r1(config)#crypto pki en
  r1(config)#crypto pki enroll 202.1.100.102
  % Start certificate enrollment ..
  % Create a challenge password. You will need to verbally provide this
  password to the CA Administrator in order to revoke your certificate.
  For security reasons your password will not be saved in the configuration.
  Please make a note of it.
  Password:                                        password是CA主页上的验证码
  Re-enter password:
  % The subject name in the certificate will include: cn=r2 ou=cisco i=zhengzhou
  % The subject name in the certificate will include: r1.liang.com
  % Include the router serial number in the subject name? [yes/no]: yes
  % The serial number in the certificate will be: 00000000
  % Include an IP address in the subject name? [no]: no
  Request certificate from CA? [yes/no]: yes
  % Certificate request sent to Certificate Authority
  % The 'show crypto ca certificate 202.1.100.102 verbose' command will show the fingerprint.
  r1(config)#
  May 18 18:17:14.655: CRYPTO_PKI: Signature Certificate Request Fingerprint MD5: D08E0D15 6458B730 80F420E7 50C7674C
  May 18 18:17:14.659: CRYPTO_PKI: Signature Certificate Request Fingerprint SHA1: 29F834C3 0C394456 D8149A94 312C9D1A 222F0802
  r1(config)#
  May 18 18:17:15.999: CRYPTO_PKI: Encryption Certificate Request Fingerprint MD5: AAF76201 20AB21BB F9A95518 ECBD7173
  May 18 18:17:16.007: CRYPTO_PKI: Encryption Certificate Request Fingerprint SHA1: 68D2A55C 39E71321 DDF2E5DD 913B2D56 B5F579D2
  r1(config)#
  May 18 18:18:30.399: %PKI-6-CERTRET: Certificate received from Certificate Authority
  r1(config)#
  May 18 18:18:42.011: %PKI-6-CERTRET: Certificate received from Certificate Authority
  如果验证码不对
  r3(config)#crypto pki enroll 202.1.100.102
  % Start certificate enrollment ..
  % Create a challenge password. You will need to verbally provide this
  password to the CA Administrator in order to revoke your certificate.
  For security reasons your password will not be saved in the configuration.
  Please make a note of it.
  Password:
  Re-enter password:
  % The subject name in the certificate will include: cn=r3 ou=nongda
  % The subject name in the certificate will include: r3.liang.com
  % Include the router serial number in the subject name? [yes/no]: no
  % Include an IP address in the subject name? [no]: no
  Request certificate from CA? [yes/no]: yes
  % Certificate request sent to Certificate Authority
  % The 'show crypto ca certificate 202.1.100.102 verbose' command will show the fingerprint.
  r3(config)#
  May 18 18:10:24.230: CRYPTO_PKI: Signature Certificate Request Fingerprint MD5: 3DAD7EC7 79B03CA2 562BDF92 28D9F25A
  May 18 18:10:24.234: CRYPTO_PKI: Signature Certificate Request Fingerprint SHA1: 72CBA0CB 1B060C8A EF95B12A 36BCAB99 5065E107
  r3(config)#
  May 18 18:10:25.582: CRYPTO_PKI: Encryption Certificate Request Fingerprint MD5: F0FA2EFE 11928FB6 33281E25 D53C1AFF
  May 18 18:10:25.586: CRYPTO_PKI: Encryption Certificate Request Fingerprint SHA1: 35ADC86F 3F46A70F A7B5FB0A 8164638E B3BEC32B
  r3(config)#
  May 18 18:10:27.066: %PKI-6-CERTREJECT: Certificate enrollment request was rejected by Certificate Authority
  May 18  不能被授权的
DSC0006.png

DSC0007.png

DSC0008.png

DSC0009.png

运维网声明 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-536067-1-1.html 上篇帖子: Python与Cisco的事儿之三 下篇帖子: Cisco Nexus 之“ip redirect”
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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