配置Client-Initiated场景下的L2TP VPN(RADIUS服务器认证)
配置Client-Initiated场景下的L2TP VPN(RADIUS服务器认证)
(1)拓扑图
(2)基础配置
华为usg防火墙
华为usg防火墙:配置接口
interface GigabitEthernet1/0/2
undo shutdown
ip binding vpn-instance default
ip address 10.12.3.3 255.255.0.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage snmp permit
service-manage telnet permit
service-manage netconf permit
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 192.168.100.254 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage snmp permit
service-manage telnet permit
service-manage netconf permit
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 192.168.200.254 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage snmp permit
service-manage telnet permit
service-manage netconf permit
#
把接口加入trust区域:
firewall zone trust
set priority 85
add interface GigabitEthernet1/0/2
add interface GigabitEthernet1/0/0
#
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/1
配置默认路由:
ip route-static 10.1.1.0 255.255.255.0 192.168.200.1
配置策略允许所有:
security-policy
default action permit
配置AAA:
aaa
manager-user admin
password cipher 密码
service-type web
level 15
sw1:
interface GE1/0/0
undo shutdown
#
interface GE1/0/1
undo shutdown
port default vlan 2
#
interface Vlanif1
ip address 10.1.1.1 255.255.255.0
#
interface Vlanif2
ip address 192.168.200.1 255.255.255.0
#
sw2:
interface GE1/0/0
undo shutdown
#
interface Vlanif1
ip address 192.168.100.100 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.100.254
相关端口:
端口:1645、1812
说明:Remot Authentication Dial-In User Service(RADIUS)authentication(Routing and Remote Access)远程认证拨号用户服务。
端口:1646、1813
说明:RADIUS accounting
端口:1701
说明:Layer Two Tunneling Protocol(L2TP)第2层隧道协议
(3.1)华为防火墙:配置RADIUS服务器对接参数。
radius-server template radius1
radius-server shared-key cipher www.zh-cjh.com
radius-server authentication 10.12.160.8 1812
华为防火墙:配置采用radius服务器进行用户身份认证。
aaa
authentication-scheme scheme_radius
authentication-mode radius
(3.2)华为防火墙:配置地址池。
如果真实环境中地址池地址和总部网络地址配置在了同一网段,则必须在LNS连接总部网络的接口上开启ARP代理功能,保证LNS可以对总部网络服务器发出的ARP请求进行应答。
ip pool pool1
section 1 172.16.1.2 172.16.1.100
(3.3)配置接入用户使用的业务方案。
aaa
service-scheme 1
ip-pool pool1
(3.4)配置认证域,引用RADIUS服务器模板及认证方案。
aaa
domain default
service-type l2tp
authentication-scheme scheme_radius
radius-server radius1
(4.1)华为防火墙:配置VT接口
interface Virtual-Template1
ppp authentication-mode pap
remote service-scheme 1
ip address 172.16.1.1 255.255.255.0
firewall zone dmz
add interface Virtual-Template1
(4.2)华为防火墙:配置L2TP Group。
LNS上配置的隧道验证密码必须与SecoClient上的配置保持一致。
2tp enable
l2tp-group 1
allow l2tp virtual-template 1 remote pc domain default
tunnel authentication
tunnel password cipher www.zh-cjh.com
(5)测试拔号
防火墙:有连接,但是客户端没有获取到ip地址
radius server: 没有日志
测试:
<USG6000V2>test-aaa u1 123456 radius-template radius1
Info: This operation may take a few minutes, please wait............
Info: Account test time out.
<USG6000V2>
<USG6000V2>ping 10.12.160.8
PING 10.12.160.8: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 10.12.160.8 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
<USG6000V2>
解决:undo ip binding vpn-instance命令用来取消接口与VPN实例的绑定。
interface GigabitEthernet1/0/2
undo shutdown
undo ip binding vpn-instance default
ip address 10.12.3.3 255.255.0.0
测试:失败
<USG6000V2>test-aaa u1 123456 radius-template radius1
Info: This operation may take a few minutes, please wait.....
Info: Authentication fails due to incorrect name, password, shared key, and so on.
<USG6000V2>
加了pap参数再进行测试:成功
<USG6000V2>test-aaa u1 123456 radius-template radius1 pap
Info: This operation may take a few minutes, please wait...
Info: Account test succeed.
<USG6000V2>
测试vpn: 成功
查看:
display ip pool name pool1 used
<USG6000V2>display l2tp tunnel
2022-09-20 08:40:00.030
L2TP::Total Tunnel: 1
LocalTID RemoteTID RemoteAddress Port Sessions RemoteName VpnInstance
------------------------------------------------------------------------------
1 130 10.1.1.101 1701 1 pc
------------------------------------------------------------------------------
Total 1, 1 printed
<USG6000V2>
VPN配置案例汇总、VPN汇总(列表、list、全)vpnlist
http://www.zh-cjh.com/wenzhangguilei/1193.html
文章归类、所有文章列表、LISTLIST
http://www.zh-cjh.com/wangzhangonggao/2195.html
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。
转载请保留出处: www.zh-cjh.com珠海陈坚浩博客 » 配置Client-Initiated场景下的L2TP VPN(RADIUS服务器认证)
作者: cjh
手机扫一扫,手机上查看此文章: |
一切源于价值!
其他 模板文件不存在: ./template/plugins/comment/pc/index.htm