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

    IPSec create route which will not be cleared

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    4 Posts 1 Posters 999 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.
    • G
      ggzengel
      last edited by

      Still the same problem.
      If I assign an interface with DHCP, then I will get a route to the destination which uses the right gateway.
      If I change the settings to an interface with a static ip the route will not be cleared.

      1 Reply Last reply Reply Quote 0
      • G
        ggzengel
        last edited by

        I suppose the problem is here (vpn_ipsec_phase1.php):

                        if ($pconfig['interface'] <> "wan") {
                                if($old_ph1ent['remote-gateway'] <> $pconfig['remotegw']) {
                                        mwexec("/sbin/route delete -host {$old_ph1ent['remote-gateway']}");
                                }
                        }
        

        The route is only deleted, if the remote gateway changes.
        It should be deleted, if the interfaces changes, too.

        1 Reply Last reply Reply Quote 0
        • G
          ggzengel
          last edited by

          I uncomment this in vpn.inc:

          log_error("IPSEC interface is not WAN but {$parentinterface}, adding static route for VPN endpoint {$rgip} via {$gatewayip}");
          

          and got in log:

          
          May 7 15:28:25 php: /vpn_ipsec.php: IPSEC interface is not WAN but opt1, adding static route for VPN endpoint 10.2.2.10 via 10.3.2.1
          May 7 15:28:25 php: /vpn_ipsec.php: IPSEC interface is not WAN but opt1, adding static route for VPN endpoint 10.2.2.10 via 10.3.2.1
          May 7 15:28:25 php: /vpn_ipsec.php: IPSEC interface is not WAN but opt1, adding static route for VPN endpoint 10.2.2.10 via 10.3.2.1
          
          

          Is $pconfig['interface'] not wan?

          1 Reply Last reply Reply Quote 0
          • G
            ggzengel
            last edited by

            I made a bug report for this (redmine #2984).

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