H3C防火墙通过l2tp实现用户***网络包括本地验证和AAA服务器的验证

 
网络拓扑图如下:
 

一、本地验证实现l2tp
1.防火墙上的基本配置
[H3C]firewall packet-filter default permit //此条命令一般防火墙上有,若没有必须添加上
[H3C-Ethernet0/0]ip add 192.168.1.1 24
[H3C]int eth0/0
[H3C-Ethernet0/0]ip add 192.168.1.1 24
[H3C-Ethernet0/0]int eth0/4
[H3C-Ethernet0/4]ip add 60.130.130.1 24
2.把接口添加到区域中才能用
[H3C]firewall zone trust
[H3C-zone-trust]add int eth0/0
[H3C]firewall zone untrust
[H3C-zone-untrust]add int eth0/4
3.建分配给客户端的地址池
[H3C]domain system
[H3C-isp-system]ip pool 1 192.168.10.1 192.168.10.20 //分配给客户端的地址
4.创建本地账号
[H3C]local-user user1
[H3C-luser-user1]password simple 123456
[H3C-luser-user1]service-type ppp    //服务器的类型选择ppp的
5.创建虚拟接口
[H3C]int Virtual-Template 0
[H3C-Virtual-Template0]ip add 192.168.10.5 24 //地址应该与地址池里的地址在同一个网段
[H3C-Virtual-Template0]ppp authentication-mode pap //验证模式选择pap认证
[H3C-Virtual-Template0]remote add pool 1    //指明对端得到的地址是从地址池1里面得到的
6.创建一个组方便对更多的用户管理
[H3C]l2tp-group 1
[H3C-l2tp1]mandatory-lcp //LCP再协商
[H3C-l2tp1]undo tunnel authentication      //不进行tunnel认证
[H3C-l2tp1]allow l2tp virtual-template 0    //接受任何LAC的l2tp请求,并绑定到VT0
 
7.重要的一步需要将虚拟端口加入到区域,此接口才能生效
[H3C]firewall zone untrust
[H3C-zone-untrust]add int Virtual-Template 0
8.作为客户端pc欲使用l2tp拨号,所需要做的配置
发起×××请求时应禁止IPSec功能,在命令行模式下执行regedit命令,弹出“注册表编辑器”对话框。
在左侧注册表项目中逐级找到:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\Parameters,单击Parameters参数,接着在右边窗口空白处单击鼠标右键,选择[新建/双字节值]并新建一个注册表值(名称为ProhibitIPSec,值为1),然后重新启动Windows
9.客户端需要新建一个***连接略
10.***连接的基本配置
 

 

 

如果出现以下的错误,表明现在禁用了ipsec的验证功能,导致验证时不能通过验证,需要需要改变验证方式。
 

 

 

 

 

11.本地认证已经通过
 

二、通过AAA服务器的验证
1.其他配置防火墙上已经做了配置,还要做的配置是做方案
[H3C]radius scheme hua
[H3C-radius-hua]primary authentication 192.168.1.100
[H3C-radius-hua]key authentication 654321
[H3C-radius-hua]server-type standard
[H3C-radius-hua]accounting optional
[H3C-radius-hua]user-name-format without-domain
2.默认域应用方案
[H3C]domain system
[H3C-isp-system]radius-scheme hua
 
3.AAA服务器山上的配置
 

 

 

 

添加用户
 

 

 

 

 

 

 

注意:建用户后和设置组的时候都要指明分配的地址池
4.验证通过获得的地址