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

NAT Source Hash - /24 subnet needs to exclude some addresses

Scheduled Pinned Locked Moved General pfSense Questions
4 Posts 2 Posters 317 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.
  • F
    fusionp
    last edited by May 15, 2018, 11:04 AM

    Hi all,

    I have a questions regarding NAT and source hash, I currently have a /24 public block of IP's, at present I have them all listed in my VIP's and I use Round Robin sticky. I would now like to use Source Hash but from my /24 subnet I don't want clients getting the first 24 IP's on my public Subnet, these are reserved my services. So how can I specify source hash NAT to use just the last 230 IP's of the subnet?
    tx

    1 Reply Last reply Reply Quote 0
    • D
      Derelict LAYER 8 Netgate
      last edited by May 15, 2018, 11:15 AM

      I don't think you can. The high /25 might be the best you can do with source hash since it must be a subnet.

      You could try to break up the sources into multiple outbound NAT rules with the other subnets but that sounds kind of messy.

      Something like:  198.50.0.24/29, 198.50.0.32/27, 198.50.0.64/26, 198.50.0.128/25

      Chattanooga, Tennessee, USA
      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
      Do Not Chat For Help! NO_WAN_EGRESS(TM)

      1 Reply Last reply Reply Quote 0
      • F
        fusionp
        last edited by May 15, 2018, 11:53 AM

        Thanks. I did consider breaking them up, and I think I might just have to do that.

        1 Reply Last reply Reply Quote 0
        • F
          fusionp
          last edited by May 16, 2018, 7:09 AM

          I went with NAT source hash subnet 3.3.3.128/25

          But it looks like(at least it seems this way) that my pfsense is also giving out the Broadcast address 3.3.3.255 to some of my clients, they then obviously lose internet access. If I check the states for their private address I see this "3.3.3.255:5205 (172.16.49.160:61396) -> 8.8.8.8:53 SINGLE:NO_TRAFFIC"

          Now I'm not sure if it's showing the broadcast address on the outgoing interface because this IP is failing to get out onto the internet?

          So as a test I changed the NAT outbound source hash rule from subnet 3.3.3.128/25 to 3.3.3.128/26 which should give out IP's up until 3.3.3.190, and ip 3.3.3.191 is the broadcast….but after making this change and searching the states I can see that pfsense is giving out the IP 3.3.3.191, this shouldn't happen as this is the ranges broadcast address.

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