Mikrotik Router Site to Site L2TP VPN Tunnel configuration


 Fig:Mikrotik Router Site-to-Site l2tp VPN Tunnel Configuration
[admin@HQ Router] > address add address= 180.140.100.2/30 interface=ether1
[admin@HQ Router] > address add address= 172.16.1.1/24 interface=ether2
[admin@HQ Router] > interface l2tp-server server set enabled=yes
[admin@HQ Router] > ppp profile add name=L2TP local-address=172.16.100.1 remote-address=172.16.100.2
[admin@HQ Router] > ppp secret add name=test profile=L2TP service=l2tp password=123 local-address=172.16.100.1 remote-address=172.16.100.2 routes="10.1.1.0/24,172.16.100.2"
[admin@HQ Router] > ip route add dst-address=0.0.0.0 gateway=180.140.100.1

[admin@HQ Router] > ppp active print
Flags: R - radius
 #   NAME         SERVICE CALLER-ID         ADDRESS         UPTIME   ENCODING 
 0   test                           l2tp    103.31.178.2      172.16.100.2      10m            11s            


[admin@HQ Router] > ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  0.0.0.0/0                                              180.140.100.1      1      
 1 ADS  10.1.1.0/24                                           172.16.1.2         1      
 2 ADS  172.16.0.0/16                                       172.16.1.2         1      
 3 ADC  172.16.100.2/32          172.16.100.1       <l2tp-test>      0      
 4 ADC  180.140.100.0/30    180.140.100.2         ether1             0      

[admin@REMOTERouter] > address add address= 103.31.178.2/30 interface=ether1
[admin@REMOTERouter] > address add address= 10.1.1.1/24 interface=ether2
[admin@REMOTERouter] > interface l2tp-client add user=branch password=123 connect-to=180.140.100.2 disabled=no
[admin@REMOTERouter] > ip route add dst-address=0.0.0.0 gateway=180.140.100.1
[admin@REMOTERouter] > ip route add dst-address=172.16.1.0/24 gateway=172.16.100.1
Mikrotik Router Site-to-Site l2tp VPN Tunnel Configuration Video  
 
[admin@Remote Router] > interface l2tp-client monitor     
numbers: 0
          status: connected
          uptime: 15m58s
       idle-time: 15m58s
             mtu: 1460
             mru: 1460
   local-address: 172.16.100.2
  remote-address: 172.16.100.1

[admin@Remote Router] > ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  0.0.0.0/0                                               103.31.178.1              1
 1 ADC  10.1.1.0/24                10.1.1.1                 ether2                    0
 2 ADC  103.31.178.0/30    103.31.178.2             ether1                    0
 3 A S  172.16.1.0/24                                       172.16.100.1              1
 4 ADC  172.16.100.1/32    172.16.100.2         l2tp-out1                   0

No comments:

Post a Comment