Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    CARP BACKUP initiating IPsec when p2 'Automatically ping host' is set

    Scheduled Pinned Locked Moved IPsec
    1 Posts 1 Posters 67 Views 1 Watching
    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.
    • J
      jtg111
      last edited by jtg111

      Hi,

      We are running pfSense Plus 26.07 in HA pairs.

      Our backup firewalls repeatedly initiate IPsec connections from the shared WAN VIP while in CARP BACKUP state when P2 are configured with "Automatically ping host".

      Clearing Phase 2 'Automatically ping host' entries stops the attempts.

      The backup check in /usr/local/bin/ping_hosts.sh uses $IFVPN, but the script never assigns it:

      if [ "$( ifconfig "$IFVPN" | grep -c "carp: BACKUP vhid" )" -gt 1 ]; then

      With the variable unset, ifconfig "" errors and the check falls through to the “pinging ipsec hosts” branch.

      Reproduced on a backup firewall in sh, with more than one CARP

      BACKUP entry:
      unset IFVPN

      Current check: prints an interface error, then "no"
      if [ "$(ifconfig "$IFVPN" | grep -c "carp: BACKUP vhid")" -gt 1 ]; then echo yes; else echo no; fi

      Older check: prints "yes"
      IFVPNSTATE=ifconfig $IFVPN | grep "carp: BACKUP vhid" | wc -l; if [ "$IFVPNSTATE" -gt 1 ]; then echo yes; else echo no; fi

      The unquoted empty variable disappears, so the old command runs plain ifconfig and finds the BACKUP entries across all interfaces. The quoted version passes an empty interface name instead.

      The quoting was added in commit 77f1f7e (“Clean up and modernize”).

      Wanted to check if anyone else is seeing this behavior here before opening a Redmine issue.

      Thanks,

      JTG

      1 Reply Last reply
      Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post
      Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
      Privacy Policy · Cookie Policy