Community discussions

MikroTik App
 
danielchagasrs
just joined
Topic Author
Posts: 1
Joined: Tue Dec 14, 2021 11:10 pm
Location: Porto Alegre - Brazil

Site to Site L2TP VPN problem with dynamic ip

Fri Jan 07, 2022 7:38 pm

HI.

I have a site to site L2TP/IPSEC vpn tunnel stablished and working, but it's having some troubles when internet goes off and returns.
Both sites have the same ISP, bith with dynamic IP, and cablemodem is set to bridge in both.
Mikrotik eth1 is wan and is receiving public valid IP.
The problem is: When the cablemodem goes off (power outagge) or the link goes down, the dhcp client receives a private IP from modem (192.168.100.0/24) before it gets the real public IP... When Mikrotik gets the real IP, the IPSEC peers goes nuts and an infinite loop starts:
- initiate new phase 1
- respond new phase 1
- ISAKMP-SA stablished
- terminating
- disconnected
- Purging ISAKMP-SA
- ISAKMP-SA deleted

To solve, I have to access both routers and disable L2TP Server and L2TP client, wait a few moments and reenable, and then it connects and works just fine.
Any ideas about this problem? Maybe a script to disable and reenable the interfaces?

Thanks

Daniel - Porto Alegre - Brazil

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], eworm, orionren, raiod and 80 guests