H3C防火墙实现L2TP本地账号和AAA服务器验证登录
防火墙配置
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]l2tp enable //启用l2tp
[H3C]inter eth0/0
[H3C-Ethernet0/0]ip add 192.168.10.1 24
[H3C-Ethernet0/0]inter eth0/4
[H3C-Ethernet0/4]ip add 61.130.130.1 24
[H3C-Ethernet0/4]quit
[H3C]inter Virtual-Template 1 //使用虚拟模板口,客户端拨上来时与之连接
[H3C-Virtual-Template1]ppp authentication-mode pap //PPP认证方式为PAP,使用system默认域
[H3C-Virtual-Template1]ip add 192.168.20.1 24
[H3C-Virtual-Template1]remote address pool 1 //指定使用ip pool 1给用户分配地址
[H3C-Virtual-Template1]quit
[H3C]l2tp-group 1 //创建地址池组
[H3C-l2tp1]undo tunnel authentication //不进行tunnel验证
[H3C-l2tp1]mandatory-lcp //LCP再协商
[H3C-l2tp1]allow l2tp virtual-template 1
[H3C-l2tp1]quit
[H3C]local-user user1 //创建本地账户,AAA验证时不需要
New local user added.
[H3C-luser-user1]password sim 123
[H3C-luser-user1]service-type ppp
[H3C-luser-user1]quit
[H3C]firewall packet-filter default permit //防火墙缺少该命令时要配置上,否则ping不通
[H3C]firewall zone trust //把端口加入相应区域
[H3C-zone-trust]add inter eth0/0
[H3C-zone-trust]quit
[H3C]firewall zone untrust
[H3C-zone-untrust]add inter eth0/4
[H3C-zone-untrust]add inter Virtual-Template 1
[H3C-zone-untrust]quit
[H3C]domain system //启用默认域
[H3C-isp-system]ip pool 1 192.168.20.1 192.168.20.10 //把客户端获得地址的地址池加入域
客户端配置
发起×××请求时应禁止IPSec功能,在命令行模式下执行regedit命令,弹出“注册表编辑器”对话框。在左侧注册表项目中逐级找到:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\Parameters,单击Parameters参数,接着在右边窗口空白处单击鼠标右键,选择[新建/双字节值]并新建一个注册表值(名称为ProhibitIPSec,值为1),然后重启计算机
在客户端创建新连接,登录前修改
测试结果
实现AAA服务器实现L2TP登录
AAA方案配置
[H3C]radius scheme aaa
[H3C-radius-aaa]primary authentication 192.168.10.10
[H3C-radius-aaa]key authentication 123456
[H3C-radius-aaa]server-type standard
[H3C-radius-aaa]accounting optional
[H3C-radius-aaa]user-name-format without-domain
引用AAA方案域的配置
[H3C]domain system //使用默认域
[H3C-isp-system]radius-scheme aaa
[H3C-isp-system]access-limit enable 10
[H3C-isp-system]accounting optional
AAA服务器配置
测试
防火墙总体配置内容浏览