Hướng dẫn cấu hình VPN Client to site với L2TP trên EdgerRouter

Hướng dẫn cấu hình VPN L2TP

Bước 1: Nhập lệnh vào mode cấu hình trên Router

configure
    

Bước 2: Tạo các quy tắc cho phép lưu lượng L2TP đi vào máy chủ trong tường lửa

set firewall name WAN_LOCAL rule 30 action accept
set firewall name WAN_LOCAL rule 30 description ike
set firewall name WAN_LOCAL rule 30 destination port 500
set firewall name WAN_LOCAL rule 30 log disable
set firewall name WAN_LOCAL rule 30 protocol udp

set firewall name WAN_LOCAL rule 40 action accept
set firewall name WAN_LOCAL rule 40 description esp
set firewall name WAN_LOCAL rule 40 log disable
set firewall name WAN_LOCAL rule 40 protocol esp

set firewall name WAN_LOCAL rule 50 action accept
set firewall name WAN_LOCAL rule 50 description nat-t
set firewall name WAN_LOCAL rule 50 destination port 4500
set firewall name WAN_LOCAL rule 50 log disable
set firewall name WAN_LOCAL rule 50 protocol udp

set firewall name WAN_LOCAL rule 60 action accept
set firewall name WAN_LOCAL rule 60 description l2tp
set firewall name WAN_LOCAL rule 60 destination port 1701
set firewall name WAN_LOCAL rule 60 ipsec match-ipsec
set firewall name WAN_LOCAL rule 60 log disable
set firewall name WAN_LOCAL rule 60 protocol udp
    

Bước 3: Cấu hình Server xác thực, trong bài hướng dẫn này sử dụng phương án xác thực local

set vpn l2tp remote-access ipsec-settings authentication mode pre-shared-secret
set vpn l2tp remote-access ipsec-settings authentication pre-shared-secret <secret>

set vpn l2tp remote-access authentication mode local
set vpn l2tp remote-access authentication local-users username <username> password <secret>
    

Bước 4: Xác định dải IP sẽ được sử dụng bởi các máy VPN client

set vpn l2tp remote-access client-ip-pool start 192.168.100.240
set vpn l2tp remote-access client-ip-pool stop 192.168.100.249
    

Bước 5: Xác định máy chủ DNS sẽ sử dụng cho máy VPN client (sử dụng DNS của Google)

set vpn l2tp remote-access dns-servers server-1 <address>
set vpn l2tp remote-access dns-servers server-2 <address>
    

Bước 6: Xác định cổng WAN để nhận yêu cầu L2TP từ các máy VPN client

    
    
set vpn l2tp remote-access dhcp-interface eth0

    
set vpn l2tp remote-access outside-address <wan-address>

    
set vpn l2tp remote-access outside-address 0.0.0.0
	

Cấu hình cổng Wan chạy dịch vụ VPN IPSEC

set vpn ipsec ipsec-interfaces interface eth0
    

Bước 7: Thực hiện chạy các lệnh đã nhập và lưu cấu hình

commit ; save
    

Lưu ý: Các lệnh sau được sử dụng để xem lại cấu hình, kiểm tra người dùng đã kết nối và phiên làm việc của VPN Client

show configuration commands
show vpn remote-access
show vpn ipsec sa
    

Post a Comment

Previous Post Next Post