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

Using PfSense to serve CGNAT or Dual Stack Lite

Scheduled Pinned Locked Moved Routing and Multi WAN
7 Posts 2 Posters 1.8k 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.
  • 0
    0daymaster
    last edited by Jul 14, 2019, 12:02 AM

    Hi. I am launching a WISP as we speak and I only have a limited IPv4 block from my upstream service provider. I'm looking to put my CPE gateways behind a CGNAT and using pfSense as a combined edge router, firewall and NAT box. Running CGNAT should be as simple as assigned a 100.64.0.0/10 subnet to an interface. My question is how to implement RFC7422 (fixed port ranges for each customer device). Or is there any way to implement Dual Stack Lite on pfSense? Thanks.

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Jul 14, 2019, 1:55 PM

      @0daymaster said in Using PfSense to serve CGNAT or Dual Stack Lite:

      RFC7422

      Very important info from that rfc.
      "The RFC Editor has chosen to publish this document at its discretion and makes no statement about its value for implementation or deployment."

      So are you are wanting to do this for the logging aspects of this? I don't see how this helps you to be honest, since you would need more IPs and Ports when customer exceeds their sessions that you have broken out to them.

      There is no such capability that I am aware of it pfsense or freebsd that could do this without large amount of manual setup.

      You could manually create the outbound nats to only use specific ports for translation, and setup them to use a specific VIP/Interface on the public side.

      portrange.png

      But not sure what happens when say you give 5000 ports to customer X and they need 5001+

      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
      • 0
        0daymaster
        last edited by 0daymaster Jul 14, 2019, 3:43 PM Jul 14, 2019, 3:42 PM

        Thanks. Yes, I want to implement this for legal reasons. By assigning ranges of ports to CPE devices I would not have to run DPI in order to track outbound connections. I will ask our upstream service provider for best practices on running CGNAT as they were the ones who suggested it.

        1 Reply Last reply Reply Quote 0
        • 0
          0daymaster
          last edited by 0daymaster Jul 14, 2019, 3:49 PM Jul 14, 2019, 3:48 PM

          @johnpoz According to Juniper 1024 ports is a liberal assignment for 250+ NAT sessions. From my experience as an MSP most customers will never exceed 1500 NAT sessions (unless they torrent) so ~5000 ports is actually a pretty good number.

          1 Reply Last reply Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator
            last edited by Jul 14, 2019, 8:58 PM

            So your customer is a single family home.. Not a business with 50 users?

            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

            0 1 Reply Last reply Jul 14, 2019, 9:02 PM Reply Quote 0
            • 0
              0daymaster @johnpoz
              last edited by Jul 14, 2019, 9:02 PM

              @johnpoz Mostly small businesses.

              1 Reply Last reply Reply Quote 0
              • 0
                0daymaster
                last edited by Jul 14, 2019, 10:01 PM

                My immediate goal in regards to addressing is to make it long enough so that I can purchase a class C IPv4 netblock on the open market. Nothing would make me happier than the death of IPv4 but until then I am forced to support it.

                1 Reply Last reply Reply Quote 0
                1 out of 7
                • First post
                  1/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received