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

    IAX2 not going out after a while

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 2 Posters 2.1k Views 2 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.
    • N Offline
      nleaudio
      last edited by

      Hello,

      I've experienced this same issue with a number of pfsense boxes:

      I have an Asterisk VOIP server sitting on the LAN port of a very simple PFSense firewall system. So simple, it could be the default configuration. The VOIP server communicates with a VOIP provider via an IAX2 UDP connection.

      This works fine, but after a few days, suddenly the IAX2 packets stop going out to the WAN. I've used tcpdump to verify that the IAX2 packets come in the LAN port, but never exit the WAN port.

      I did a search thru the rules - nothing blocking. I did a search on the states for the IP address of the IAX2 provider, nothing. Yet when I reset the states, it starts working again... For an undetermined amount of time, then stops again.

      This happens on multiple PFSense boxes, so I know its not just a fluke with one. I've also seen a few other messages with people having similar situations, with no apparent resolve. How can I help to resolve this?

      Bob

      1 Reply Last reply Reply Quote 0
      • stephenw10S Offline
        stephenw10 Netgate Administrator
        last edited by

        Check for open states when it stops passing the traffic. If packets arrive at the LAN port there should be at least a state for it there unless the firewall is blocking it for some reason.

        If there are states but it never leaves the WAN then it's either: trying to use some other route, has no route at all, is being collected by IPSec, or is blocked outbound for some reason.

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          nleaudio @stephenw10
          last edited by

          @stephenw10
          I checked for any open states for the IP address of the IAX2 server, but nothing. That is what is so puzzling!

          Is there some maximum length of a state?

          Bob

          1 Reply Last reply Reply Quote 0
          • stephenw10S Offline
            stephenw10 Netgate Administrator
            last edited by

            Yes there are. They are defined in pf. You can set longer timeouts or choose a firewall mode that has longer timeouts already defined, like 'conservative', in Sys > Adv > Firewall.

            But that only applies to states not passing traffic.

            1 Reply Last reply Reply Quote 0
            • N Offline
              nleaudio
              last edited by

              IAX2 traffic should have keepalive packets going. And they typically do. So far, I'm at 2 weeks now that it has been up and working, but I bet within the next week or two, it will die again. That has been the pattern. And the strange thing is, it's not just one PFSense box. I've seen this exact thing happen on other boxes as well, most of them having almost no variation from the default config, except customized LAN and WAN addresses.

              1 Reply Last reply Reply Quote 0
              • stephenw10S Offline
                stephenw10 Netgate Administrator
                last edited by

                Mmm, you'll probably have to wait for it to fail and check what states are still there. I'd expect it to just re-connect if the states timed out and start to fail.

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