L2TP实验

一、实验拓扑

二、实验内容

手工部署IPec VPN

三、实验步骤

1、配置接口IP和安全区域

[PPPoE Client]firewall zone trust 
[PPPoE Client-zone-trust]add int g 1/0/0
 
[NAS]firewall zone untrust 
[NAS-zone-untrust]add int g 1/0/1	
[NAS]firewall zone trust 
[NAS-zone-trust]add int g 1/0/0
 
[LNS]firewall zone untrust 
[LNS-zone-untrust]add int g 1/0/0
[LNS]firewall zone trust 
[LNS-zone-trust]add int g 1/0/1

2、配置公网路由

[FW1]ip route-static 0.0.0.0 0 1.1.1.2
 
[FW2]ip route-static 0.0.0.0 0 1.1.2.2

3、L2TP配置

(1)PPPoE Client

[PPPoE Client]int Dialer 1
[PPPoE Client-Dialer1]dialer user user1
[PPPoE Client-Dialer1]dialer-group 1
[PPPoE Client-Dialer1]ip address ppp-negotiate 
[PPPoE Client-Dialer1]ppp chap user user1
[PPPoE Client-Dialer1]ppp chap password cipher Password123
[PPPoE Client]dialer-rule 1 ip permit 
[PPPoE Client]int g 1/0/0
[PPPoE Client-GigabitEthernet1/0/0]pppoe-client dial-bundle-number 1

(2)NAS

[LAC]interface Virtual-Template 1	
[LAC-Virtual-Template1]ppp authentication-mode chap 
 The command is used to configure the PPP authentication mode on the local end. 
Confirm that the peer end adopts the corresponding PPP authentication. Continue[
Y/N]:y
[LAC-Virtual-Template1]ip address 2.2.2.2 24
[LAC]firewall zone dmz	
[LAC-zone-dmz]add interface Virtual-Template 1
 
[LAC]int g 1/0/0	
[LAC-GigabitEthernet1/0/0]pppoe-server bind virtual-template 1
[LAC-GigabitEthernet1/0/0]q
 
[LAC]aaa
Info: The domain default is for common users.
[LAC-aaa-domain-default]service-type l2tp
 
[LAC]user-manage user user1 domain default 
[LAC-localuser-user1]password Password123

4、建立L2TP隧道

[LAC]l2tp enable 
[LAC]l2tp-group 1
[LAC-l2tp-1]tunnel authentication 	
[LAC-l2tp-1]tunnel password cipher 
[LAC-l2tp-1]tunnel password cipher Hello123
[LAC-l2tp-1]tunnel name lac
[LAC-l2tp-1]start l2tp ip 20.1.1.2 fullusername user1

5、LNS配置

[LNS]ip pool l2tp
[LNS-ip-pool-l2tp]section 0 172.16.1.2 172.16.1.100 
[LNS-aaa]service-scheme l2tp
Info: Create a new service scheme.
[LNS-aaa-service-l2tp]ip-pool l2tp
[LNS-aaa]domain default 
Info: The domain default is for common users.
[LNS-aaa-domain-default]
[LNS-aaa-domain-default]service-type l2tp
[LNS]user-manage user user1 domain default 
[LNS-localuser-user1]password Password123
[LNS]interface Virtual-Template 1
[LNS-Virtual-Template1]ppp authentication-mode chap
[LNS-Virtual-Template1]ip address 172.16.0.1 24
[LNS-Virtual-Template1]remote service-scheme l2tp
[LNS]firewall zone dmz	
[LNS-zone-dmz]add interface Virtual-Template 1
[LNS]l2tp enable 
[LNS]l2tp-group 1
[LNS-l2tp-1]allow l2tp 
[LNS-l2tp-1]allow l2tp virtual-template 1 remote lac domain default
[LNS-l2tp-1]tunnel authentication 
[LNS-l2tp-1]tunnel password cipher Hello123

6、路由补充

[PPPoE Client]ip route-static 0.0.0.0 0 Dialer 1  出接口方式
 
[PPPoE Client]firewall zone dmz  将Dialer 1接口划分到dmz区域,方便发包:
[PPPoE Client-zone-dmz]add interface Dialer 1

7、将所有设备的默认安全策略放通

[PPPoE Client]security-policy
[PPPoE Client-policy-security]default action permit
 
[LAC]security-policy
[LAC-policy-security]default action permit
 
[LNS]security-policy	
[LNS-policy-security]default action permit 

8、安全策略配置

(1)NAS

[LAC]security-policy
[LAC-policy-security]default action deny   先恢复默认策略为拒绝
 Warning: Setting the default interzone packet filtering to deny may affect actu
al data traffic. You are advised to configure the security policy based on the a
ctual services. Are you sure you want to continue? [Y/N]y
[LAC-policy-security]rule name local_to_untrust
[LAC-policy-security-rule-local_to_untrust]source-zone local
[LAC-policy-security-rule-local_to_untrust]destination-zone untrust
[LAC-policy-security-rule-local_to_untrust]source-address 20.1.1.1 mask 255.255.
255.255
[LAC-policy-security-rule-local_to_untrust]destination-zone
[LAC-policy-security-rule-local_to_untrust]destination-address 20.1.1.2 mask255.
255.255.255
[LAC-policy-security-rule-local_to_untrust]service l2tp
[LAC-policy-security-rule-local_to_untrust]service protocol udp source-port 0 to
 65535 destination-port 1701	
[LAC-policy-security-rule-local_to_untrust]action permit 

(2)LNS

[LNS]security-policy 	
[LNS-policy-security]default action deny 
[LNS-policy-security]dis this
security-policy
 rule name untrust_to_local
  source-zone untrust
  destination-zone local
  source-address 20.1.1.1 mask 255.255.255.255
  destination-address 20.1.1.2 mask 255.255.255.255
  service l2tp
  service protocol udp destination-port 1701
  action permit
 rule name dmz_to_trust
  source-zone dmz
  destination-zone trust
  source-address 172.16.1.0 mask 255.255.255.0
  destination-address 192.168.1.0 mask 255.255.255.0
  action permit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值