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

    Is there any way of overcoming double NAT with pfSense in front of Edge Gateway?

    Scheduled Pinned Locked Moved NAT
    10 Posts 2 Posters 4.6k 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.
    • J
      jonathanbaird
      last edited by

      Hi,

      I am having intermittent one way audio issues with VoIP, and I am not sure if double NAT is the cause of this. I am basically running a PBX in a VMware vCloud environment. I have an Edge Gateway on the perminiter, a pfSense VM in the DMZ and then a PBX behind this. My setup is as follows.

      Edge Gateway > pfSense > PBX

      Edge Gateway IP Addresses:

      WAN: 88.x.x.x
      LAN: 192.168.1.254

      pfSense IP Addresses:

      WAN: 192.168.1.1
      LAN: 172.16.1.254

      PBX IP Addresses:

      LAN: 172.16.1.10

      As you can see with this setup I am double NATing. I posted another topic related to the one way audio issue here https://forum.pfsense.org/index.php?topic=107413.0. Now although I do not think this is the issue, I cannot rule anything out at this stage.

      Is there anything I can do so that the pfSense does not NAT, and leave the Edge Gateway to handle all the NATing? I need to rule out everything I can here before I look to change VoIP providers. Every time I take this up with my VoIP provider they simply say this is a firewall issue. The issue is very intermittent but I understand double NAT causes intermittent issues and I am not sure if this is the cause of my problems!

      Any advice or suggestions would be welcome.

      Thank you in advance.

      Jonathan.

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        But your edge device in bridge mode..  So it does not nat!

        Or turn your pfsense into just a router/firewall so it does not nat.  But now you need to put in downstream routes on your edge and it will have to nat the downstream networks and you will connect pfsense to your edge with a transit network.

        Other option is to turn pfsense into a bridge/transparent firewall.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • J
          jonathanbaird
          last edited by

          Hi,

          Thanks for your response. Please see comments below.

          @johnpoz:

          But your edge device in bridge mode..  So it does not nat!

          This would be the best possible solution, but unfortunately it isn't possible. I'm using VMware vCloud Director so I am stuck with their "Edge Gateway" which offers very limited functionality - hence the requirement for pfSense in the first place. Also if I want to add a IPSec VPN tunnel to the Edge Gateway, there's a cost for each tunnel I add which I don't really want to be paying for.

          Or turn your pfsense into just a router/firewall so it does not nat.  But now you need to put in downstream routes on your edge and it will have to nat the downstream networks and you will connect pfsense to your edge with a transit network.

          This sounds good, although possible a little complicated! Maybe I am not understanding properly. Can I just check what you mean when you say "put downstream routes on your edge and it will have to nat the downstream networks and you will connect pfsense to your edge with a transit network". Sorry to be a paint but are you able to expand on this please?

          Other option is to turn pfsense into a bridge/transparent firewall.

          Very possible solution, would pfSense still handle the inbound NAT translations and firewall rules? Whatever solution I go with I need to make sure it allows for the use of IPSec VPN tunnels to the pfSense, as they are a requirement for what I am doing.

          Thank you in advance.

          1 Reply Last reply Reply Quote 0
          • J
            jonathanbaird
            last edited by

            Also, maybe as another idea. Could I use the following to overcome double NAT?

            To completely disable NAT to have a routing-only firewall, do the following.

            Go to the Firewall -> NAT page, and click the Outbound tab.
                Select the option "Manual Outbound NAT rule generation (Advanced Outbound NAT (AON))" and click Save.
                Remove all automatically generated NAT rules at the bottom of the screen.
                Apply changes

            My question here is how would the edge gateway see the traffic, would it have a source IP of a device from the 172.16.1.0 /24 network even though it leaves the 192.168.1.1 WAN interface? That way I could leave the outbound rules in place for ISAKMP negotiations.

            Would this be a feasible solution?

            Thank you in advance.

            Jonathan.

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              "still handle the inbound NAT translations and firewall rules?"

              Dude I thought you wanted to disable double nat??

              I think you missing what nat does…  If you turn off pfsense nat.. Then you have to adjust the routing on your edge... He would have to know to send traffic to 172.16 he needs to send it to pfsense wan IP in his 192.168 network..

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • J
                jonathanbaird
                last edited by

                @johnpoz:

                "still handle the inbound NAT translations and firewall rules?"

                Dude I thought you wanted to disable double nat??

                I think you missing what nat does…  If you turn off pfsense nat.. Then you have to adjust the routing on your edge... He would have to know to send traffic to 172.16 he needs to send it to pfsense wan IP in his 192.168 network..

                I want to disable outbound NAT only. Forgive me if I am misunderstanding, but can I not disable outbound NAT on the pfSense and still forward everything to the WAN interface of the pfSense from the edge gateway?

                I am ok with adding a static route on the edge to point the 172.16.1.0 network to the next hop - this bit I have tried and works fine. It is purely the outbound NAT I am not too sure on.

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  If you can edit the routes on your edge router, then sure you can turn off nat on pfsense and turn it into just a firewall/router.. You now just turned this 192.168 network into a transit network.  Do you have any device on this network you will want to talk to from devices behind pfsense?

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • J
                    jonathanbaird
                    last edited by

                    @johnpoz:

                    If you can edit the routes on your edge router, then sure you can turn off nat on pfsense and turn it into just a firewall/router.. You now just turned this 192.168 network into a transit network.  Do you have any device on this network you will want to talk to from devices behind pfsense?

                    This sounds to be like what I am after - I think! I don't have any devices on the 192.168.1.0 network at all, it is purely used connecting the edge gateway LAN to the pfSense WAN…

                    Is this what you meant by "Or turn your pfsense into just a router/firewall so it does not nat.  But now you need to put in downstream routes on your edge and it will have to nat the downstream networks and you will connect pfsense to your edge with a transit network." I take it?

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      Exactly ;)  once you turn off nat, you just have to allow the traffic in your wan rules.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • J
                        jonathanbaird
                        last edited by

                        Thanks for your help, I'll give this a go…!

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