Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [Solved] Fail to Connect IPsec/L2TP Server after Server IP Changed ( Server Has Dynamic IP)

    Scheduled Pinned Locked Moved IPsec
    3 Posts 1 Posters 392 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      Upper Deck
      last edited by Upper Deck

      Hi there,

      Good day.

      I'm running a pfSense box at home with IPsec/L2TP Server enabled. My ISP reassigns IP address periodicity. After the changing of WAN IP address, I can not connect my VPN with the new IP address (DynamicDNS). I have to restart the L2TP service, then my VPN works.

      How to resolve this problem?

      Please help. Many many thanks.

      1 Reply Last reply Reply Quote 0
      • U
        Upper Deck
        last edited by

        For those who face this problem:

        I finallly solved this problem. After the ISP reassigned a new IP address, L2TP still listening on the first IP address while it started. In"/var/etc/l2tp-vpn/mpd.conf" the line "set l2tp self xxx.xxx.xxx.xxx" is always the very first IP address it gets.

        I modified "/etc/inc/vpn.inc": change [ "$l2tp_listen="set l2tp self $ipaddr";" ] to [ $l2tp_listen="set l2tp self 0.0.0.0"; ]. It makes the l2tp always listen on 0.0.0.0.

        Probably there are better solutions then this one. However, it fixed my problem for now.

        1 Reply Last reply Reply Quote 0
        • U
          Upper Deck
          last edited by

          BTW:
          IPsec works perfectly. You can see it was connected for a while when l2tp is down.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.