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

    Source port different after passing through NAT

    NAT
    3
    6
    2.2k
    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.
    • T
      thexder1
      last edited by

      I have a PFsense router setup with NAT internally. I have a PBX system running freePBX and I have a wholesale SIP trunk from Gafachi. The problem that I am running into is that the source port on the audio is not the same when the router forwards the packet to Gafachi as it is when the PBX sends it. Apparently Gafachi requires that the source port be the same as the port that they use as a destination port for the audio. This problem seems to have just started with no changes being made to the configuration of PFsense, or the PBX. I am not sure why I did not see this problem before, or why it seems to have shown up out of nowhere, but I need to find out why the source port is changing and get it fixed. Does anyone have an idea on what I need to do to fix this?

      I am running PFsense 2.0 on a computer with a core 2 duo processor, I have 3 network connections on it, 1 is going to the internet, 1 is going to most of the internal network, and the last one is connecting to the PBX.

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        @thexder1:

        I need to find out why the source port is changing and get it fixed.

        Change the outbound nat mode do manual and create an outbound nat rule to your sip server with static port option selected.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • T
          thexder1
          last edited by

          I think that might work, but right now that seems to have completely broken it. for some reason no matter what I try it looks  like it is not translating the address at all. I am not sure why it is doing that. Probably a setting that I am not aware of.

          1 Reply Last reply Reply Quote 0
          • T
            thexder1
            last edited by

            NM I figured out that part of it. Now I have to get Gafachi to fix a problem on their end and I think I will have it working now.

            1 Reply Last reply Reply Quote 0
            • D
              dhatz
              last edited by

              You can try static-port as marcelloc suggested, but generally speaking most providers have no issues with port rewriting (which is pfsense's default behavior since v2.x).

              1 Reply Last reply Reply Quote 0
              • T
                thexder1
                last edited by

                I got it to work. This is not the first time that I have had to do setup like this to get the Gafachi trunk working. I will be switching to a different provider as soon as possible since this is the second time they seem to have changed the setup on their end without notification and caused my phone system to go down, right in the middle of doing a lot of advertising.

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