This section provides an example for configuring L2TP VPN (local authentication) in the call-LNS scenario. In the scenario, the LAC and LNS establish a permanent L2TP VPN tunnel. Employees in the branch can access headquarters servers through the L2TP VPN tunnel.
As shown in Figure 1, the egress gateway of the branch is the LAC, and the egress gateway of the headquarters is the LNS. Employees in the branch need to access headquarters servers across the Internet. The enterprise needs to establish an L2TP VPN tunnel between the LAC and LNS so that employees in the branch can access headquarters servers through the L2TP VPN tunnel.
Item |
Data |
|
|---|---|---|
LAC |
Interface |
Interface ID: GigabitEthernet 0/0/1 IP address: 1.1.1.1/24 Security zone: Untrust Interface ID: GigabitEthernet 0/0/3 IP address: 192.168.1.1/24 Security zone: Trust |
L2TP configuration |
Server address configuration mode: IP address Server address: 1.2.1.1/24 LAC automatic dialup: enabled User name: user0001 Password: Password123 Local tunnel name: LAC Tunnel authentication password: Hello123 |
|
LNS |
Interface |
Interface ID: GigabitEthernet 0/0/1 IP address: 1.2.1.1/24 Security zone: Untrust Interface ID: GigabitEthernet 0/0/3 IP address: 10.1.1.1/24 Security zone: Trust |
L2TP configuration |
Peer tunnel name: LAC Tunnel authentication password: Hello123 User authentication name: user0001 Password: Password123 Server address: 10.2.1.1/24 User address pool: 10.2.1.2/24 to 10.2.1.100/24 NOTE:
If the intranet server IP address and address pool addresses are on different network segments, configure a route on the intranet server to an address in the address pool. |
|
Configuration script of the LAC
#
l2tp enable
l2tp domain suffix-separator @
#
l2tp-group lac
tunnel password cipher %$%$Sd2\*,\eT=XIuj1J`j36~K)_%$%$
tunnel name LAC
start l2tp ip 1.2.1.1 fullusername user0001
#
interface Virtual-Template1
ppp authentication-mode chap pap
ppp chap user user0001
ppp chap password cipher %$%$>x{UJZIoJ>`<}u"b0!#%\pg^%$%$
ppp pap local-user user0001 password cipher %$%$qTc=ESCX_M&3,Y-]$@}Q\aXO%$%$
ip address ppp-negotiate
call-lns local-user user0001 binding l2tp-group LAC
alias L2TP_LAC_0
undo service-manage enable
#
interface GigabitEthernet0/0/1
ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/3
ip address 192.168.1.1 255.255.255.0
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/3
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
#
firewall zone dmz
set priority 50
add interface Virtual-Template1
#
ip route-static 10.1.1.0 255.255.255.0 Virtual-Template1
ip route-static 0.0.0.0 0.0.0.0 1.1.1.2
#
nat-policy
rule name easy_ip
source-zone trust
egress-interface Virtual-Template1
source-address 192.168.1.0 24
action source-nat easy-ip
#
security-policy
rule name service_td
source-zone trust
destination-zone dmz
source-address 192.168.1.0 24
destination-address 10.1.1.0 24
action permit
rule name service_dt
source-zone dmz
destination-zone trust
source-address 10.1.1.0 24
destination-address 192.168.1.0 24
action permit
rule name l2tp_lu
source-zone local
destination-zone untrust
source-address 1.1.1.0 24
destination-address 1.2.1.0 24
action permit
Configuration script of the LNS
# l2tp enable l2tp domain suffix-separator @ # ip pool pool section 1 10.2.1.2 10.2.1.100 # aaa authentication-scheme default # authorization-scheme default # accounting-scheme default # service-scheme l2tpSScheme_1498873877504 ip-pool pool # domain default service-type l2tp service-scheme l2tpSScheme_1498873877504 # l2tp-group lns allow l2tp virtual-template 1 remote LAC domain default tunnel password cipher %$%$cgc'GPcWL#hp3EC;K[nM[QH~%$%$ # interface Virtual-Template1 ppp authentication-mode chap pap remote service-scheme l2tpSScheme_1498873877504 ip address 10.2.1.1 255.255.255.0 alias L2TP_LNS_1 undo service-manage enable # interface GigabitEthernet0/0/1 ip address 1.2.1.1 255.255.255.0 # interface GigabitEthernet0/0/3 ip address 10.1.1.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # firewall zone dmz set priority 50 add interface Virtual-Template1 # ip route-static 0.0.0.0 0.0.0.0 1.2.1.2 # security-policy rule name service_td source-zone trust destination-zone dmz source-address 10.1.1.0 24 destination-address 10.2.1.0 24 action permit rule name service_dt source-zone dmz destination-zone trust source-address 10.2.1.0 24 destination-address 10.1.1.0 24 action permit rule name l2tp_ul source-zone untrust destination-zone local source-address 1.1.1.0 24 destination-address 1.2.1.0 24 action permit # The following configurations for creating users are stored in the database, not described in the configuration file. user-manage user user0001 parent-group /default password ********** undo multi-ip online enable