F1060 L2TP VPN典型组网配置案例(独立LAC与客户LAC共存)

组网及说明

组网说明:

本案例采用H3C HCL模拟器来模拟L2TP VPN典型组网配置案例。内网和外网在网络拓扑图中已经有了明确标识。为了使得分支节点和移动办公通过VPN接入内网访问SW1。

1、FW1为内网的出口设备,提供内网的NAT地址转换服务。

2、FW1与FW2建立L2TP VPN隧道,采用独立LAC模式、FW1为LNS,FW2为LAC

3、FW1与物理机建立L2TP VPN隧道,采用客户LAC模式、FW1为LNS,物理机为LAC

配置步骤

1、按照网络拓扑图正确配置IP地址

2、FW2配置NAT地址转换,并配置默认路由指向ISP

3、FW1配置NAT地址转换,并配置默认路由指向ISP

4、FW2配置为L2TP VPN LAC端点

5、FW1配置为L2TP VPN LNS端点

6、SW1开启WEB功能,并创建相应用户及分配权限

配置关键点

SW1:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname SW1

[SW1]int gi 1/0/1

[SW1-GigabitEthernet1/0/1]port link-mode route

[SW1-GigabitEthernet1/0/1]des <connect to FW1>

[SW1-GigabitEthernet1/0/1]ip address 10.0.0.1 30

[SW1-GigabitEthernet1/0/1]quit

[SW1]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

[SW1]ip http enable

[SW1]ip https enable

[SW1]local-user admin

New local user added.

[SW1-luser-manage-admin]password simple admin

[SW1-luser-manage-admin]service-type http https

[SW1-luser-manage-admin]authorization-attribute user-role network-admin

[SW1-luser-manage-admin]quit
ISP:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname ISP

[ISP]int gi 0/0

[ISP-GigabitEthernet0/0]des <connect to FW2>

[ISP-GigabitEthernet0/0]ip address 202.1.100.1 30

[ISP-GigabitEthernet0/0]quit

[ISP]int gi 0/1

[ISP-GigabitEthernet0/1]des <connect to FW1>

[ISP-GigabitEthernet0/1]ip address 202.2.100.1 30

[ISP-GigabitEthernet0/1]quit
FW2:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname FW2

[FW2]acl basic 2000

[FW2-acl-ipv4-basic-2000]rule 0 permit source any

[FW2-acl-ipv4-basic-2000]quit

[FW2]int gi 1/0/2

[FW2-GigabitEthernet1/0/2]des <connect to ISP>

[FW2-GigabitEthernet1/0/2]ip address 202.1.100.2 30

[FW2-GigabitEthernet1/0/2]nat outbound 2000

[FW2-GigabitEthernet1/0/2]quit

[FW2]ip route-static 0.0.0.0 0.0.0.0 202.1.100.1

[FW2]security-zone name Untrust

[FW2-security-zone-Untrust]import interface GigabitEthernet 1/0/2

[FW2-security-zone-Untrust]quit

[FW2]acl basic 2001

[FW2-acl-ipv4-basic-2001]rule 0 permit source any

[FW2-acl-ipv4-basic-2001]quit

[FW2]

[FW2]zone-pair security source trust destination untrust

[FW2-zone-pair-security-Trust-Untrust]packet-filter 2001

[FW2-zone-pair-security-Trust-Untrust]quit

[FW2]

[FW2]zone-pair security source untrust destination trust

[FW2-zone-pair-security-Untrust-Trust]packet-filter 2001

[FW2-zone-pair-security-Untrust-Trust]quit

[FW2]

[FW2]zone-pair security source trust destination local

[FW2-zone-pair-security-Trust-Local]packet-filter 2001

[FW2-zone-pair-security-Trust-Local]quit

[FW2]

[FW2]zone-pair security source local destination trust

[FW2-zone-pair-security-Local-Trust]packet-filter 2001

[FW2-zone-pair-security-Local-Trust]quit

[FW2]

[FW2]zone-pair security source untrust destination local

[FW2-zone-pair-security-Untrust-Local]packet-filter 2001

[FW2-zone-pair-security-Untrust-Local]quit

[FW2]

[FW2]zone-pair security source local destination untrust

[FW2-zone-pair-security-Local-Untrust]packet-filter 2001

[FW2-zone-pair-security-Local-Untrust]quit

FW2 L2TP VPN LAC端点配置关键点:


[FW2]local-user weijianing class network

New local user added.

[FW2-luser-network-weijianing]password simple weijianing

[FW2-luser-network-weijianing]service-type ppp

[FW2-luser-network-weijianing]quit

[FW2]l2tp enable

[FW2]l2tp-group 1 mode lac

[FW2-l2tp1]tunnel name LAC

[FW2-l2tp1]tunnel authentication

[FW2-l2tp1]tunnel password simple weijianing

[FW2-l2tp1]user fullusername weijianing

[FW2-l2tp1]source 202.1.100.2

[FW2-l2tp1]lns-ip 202.2.100.2

[FW2-l2tp1]quit

[FW2]int Virtual-PPP 1

[FW2-Virtual-PPP1]ip address ppp-negotiate

[FW2-Virtual-PPP1]ppp chap user weijianing

[FW2-Virtual-PPP1]ppp chap password simple weijianing

[FW2-Virtual-PPP1]l2tp-auto-client l2tp-group 1

[FW2-Virtual-PPP1]quit

[FW2]ip route-static 172.16.1.0 255.255.255.0 Virtual-PPP 1

[FW2]ip route-static 10.0.0.0 255.255.255.0 Virtual-PPP 1

[FW2]security-zone name Untrust

[FW2-security-zone-Untrust]import interface Virtual-PPP 1

[FW2-security-zone-Untrust]quit

FW1:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname FW1

[FW1]int gi 1/0/3

[FW1-GigabitEthernet1/0/3]ip address 10.0.0.2 30

[FW1-GigabitEthernet1/0/3]des <connect to SW1>

[FW1-GigabitEthernet1/0/3]quit

[FW1]acl basic 2000

[FW1-acl-ipv4-basic-2000]rule 0 permit source any

[FW1-acl-ipv4-basic-2000]quit

[FW1]int gi 1/0/2

[FW1-GigabitEthernet1/0/2]des <connect to R1>

[FW1-GigabitEthernet1/0/2]ip address 202.2.100.2 30

[FW1-GigabitEthernet1/0/2]nat outbound 2000

[FW1-GigabitEthernet1/0/2]quit

[FW1]ip route-static 0.0.0.0 0.0.0.0 202.2.100.1

[FW1]int gi 1/0/4

[FW1-GigabitEthernet1/0/4]des <connect to ISP1>

[FW1-GigabitEthernet1/0/4]ip address 202.3.100.2 30

[FW1-GigabitEthernet1/0/4]nat outbound 2000

[FW1-GigabitEthernet1/0/4]quit

[FW1]ip route-static 202.103.224.0 255.255.255.0 202.3.100.1

[FW1]security-zone name trust

[FW1-security-zone-Trust]import interface GigabitEthernet 1/0/3

[FW1-security-zone-Trust]quit

[FW1]security-zone name Untrust

[FW1-security-zone-Untrust]import interface GigabitEthernet 1/0/2

[FW1-security-zone-Untrust]import interface GigabitEthernet 1/0/4

[FW1-security-zone-Untrust]quit

[FW1]acl basic 2001

[FW1-acl-ipv4-basic-2001]rule 0 permit source any

[FW1-acl-ipv4-basic-2001]quit

[FW1]

[FW1]zone-pair security source trust destination untrust

[FW1-zone-pair-security-Trust-Untrust]packet-filter 2001

[FW1-zone-pair-security-Trust-Untrust]quit

[FW1]

[FW1]zone-pair security source untrust destination trust

[FW1-zone-pair-security-Untrust-Trust]packet-filter 2001

[FW1-zone-pair-security-Untrust-Trust]quit

[FW1]

[FW1]zone-pair security source trust destination local

[FW1-zone-pair-security-Trust-Local]packet-filter 2001

[FW1-zone-pair-security-Trust-Local]quit

[FW1]

[FW1]zone-pair security source local destination trust

[FW1-zone-pair-security-Local-Trust]packet-filter 2001

[FW1-zone-pair-security-Local-Trust]quit

[FW1]

[FW1]zone-pair security source untrust destination local

[FW1-zone-pair-security-Untrust-Local]packet-filter 2001

[FW1-zone-pair-security-Untrust-Local]quit

[FW1]

[FW1]zone-pair security source local destination untrust

[FW1-zone-pair-security-Local-Untrust]packet-filter 2001

[FW1-zone-pair-security-Local-Untrust]quit

FW1 L2TP VPN LNS关键配置点1(用于与独立LAC建立隧道):

[FW1]local-user weijianing class network

New local user added.

[FW1-luser-network-weijianing]password simple weijianing

[FW1-luser-network-weijianing]service-type ppp

[FW1-luser-network-weijianing]quit

[FW1]domain system

[FW1-isp-system]authentication ppp local

[FW1-isp-system]quit

[FW1]ip pool weijianing 172.16.1.2 172.16.1.254

[FW1]ip pool weijianing gateway 172.16.1.1

[FW1]int Virtual-Template 1

[FW1-Virtual-Template1]ip address 172.16.1.1 24

[FW1-Virtual-Template1]ppp authentication-mode chap domain system

[FW1-Virtual-Template1]remote address pool weijianing

[FW1-Virtual-Template1]quit

[FW1]security-zone name Untrust

[FW1-security-zone-Untrust]import interface Virtual-Template 1

[FW1-security-zone-Untrust]quit

[FW1]l2tp enable

[FW1]l2tp-group 1 mode lns

[FW1-l2tp1]tunnel authentication

[FW1-l2tp1]tunnel name LNS

[FW1-l2tp1]allow l2tp virtual-template 1 remote LAC

[FW1-l2tp1]tunnel password simple weijianing

[FW1-l2tp1]quit

FW1 L2TP VPN LNS关键配置点2(用于与客户LAC建立隧道):

[FW1]local-user ninglihua class network

New local user added.

[FW1-luser-network-ninglihua]password simple ninglihua

[FW1-luser-network-ninglihua]service-type ppp

[FW1-luser-network-ninglihua]quit

[FW1]ip pool ninglihua 172.16.100.2 172.16.100.254

[FW1]ip pool ninglihua gateway 172.16.100.1

[FW1]int Virtual-Template 2

[FW1-Virtual-Template2]ip address 172.16.100.1 24

[FW1-Virtual-Template2]ppp authentication-mode chap domain system

[FW1-Virtual-Template2]remote address pool ninglihua

[FW1-Virtual-Template2]quit

[FW1]domain system

[FW1-isp-system]authentication ppp local

[FW1-isp-system]quit

[FW1]security-zone name Untrust

[FW1-security-zone-Untrust]import interface Virtual-Template 2

[FW1-security-zone-Untrust]quit

[FW1]l2tp enable

[FW1]l2tp-group 2 mode lns

[FW1-l2tp2]undo tunnel authentication

[FW1-l2tp2]tunnel name LNS

[FW1-l2tp2]allow l2tp virtual-template 2 remote h3c

[FW1-l2tp2]quit
ISP1:

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]sysname ISP1

[ISP1]int gi 0/0

[ISP1-GigabitEthernet0/0]ip address 202.103.224.254 24

[ISP1-GigabitEthernet0/0]quit

[ISP1]int gi 0/1

[ISP1-GigabitEthernet0/1]des <connect to FW1>

[ISP1-GigabitEthernet0/1]ip address 202.3.100.1 30

[ISP1-GigabitEthernet0/1]quit

[ISP1]

测试:

物理机填写IP地址:

物理机能PING通FW1的外网地址,PING不通私网地址:

打开iNode智能客户端,设置LNS服务器信息:

输入用户名、密码,点击连接:

连接成功:

查看获取到的IP地址:

物理机能PING通SW1:

物理机通过打开浏览器,也可以访问SW1的WEB:

查看FW2获取到的IP地址:

FW2使用获取到的IP地址作为源,可以PING通SW1:

查看FW2的隧道显示信息:

查看FW1的L2TP显示信息:

查看FW1分配出去的IP地址:

至此,F1060 L2TP VPN典型组网配置案例(独立LAC与客户LAC共存)已完成!

努力学习,勤奋工作,让青春更加光彩

再长的路,一步步也能走完,再短的路,不迈开双脚也无法到达

添加微信免费咨询服务器配置选择建议
微信号:landuiYY

未经允许不得转载:云技术 » F1060 L2TP VPN典型组网配置案例(独立LAC与客户LAC共存)

赞 (0)