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

    Multiple Devices behind NAT communicating

    Scheduled Pinned Locked Moved NAT
    nat 2 nat comms
    4 Posts 2 Posters 556 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.
    • G
      GreenPeter2
      last edited by

      I have had this issue on multiple routers and was hoping pfsense may have a way around.
      A pfsense box with 3 interfaces. Imaginary IPs. Lan (192.168.1.1/24), Wan (203.100.100.1/30), DMZ (192.168.2.1/24). Also the ISP has assigned a subnet (203.100.101.1/29)
      DMZ is there to publish services to the internet that I would rather didn't exist on the Lan.
      This is a rather secure environment and there is generally NO Lan to Wan direct comms.
      I placed the ISP secondary subnet as a Virtual IP so that devices living in the DMZ can have NATs (port forward or 1:1) associated to them.
      This all works as planned. DMZ devices can publish services which are then given Public Domain A records.
      My issue is that I sometimes need a device in the DMZ to use DNS to call another device inside the DMZ.
      Unfortunately the NAT doesn't allow an outbound and inbound connection on addresses that are both being translated which is fair enough when you consider how it is working.
      Other than playing with a DNS forwarder/server and faking A records to use a DMZ address rather then the Public address is there a better way to setup a route that can recognize I have DMZ to DMZ requests?

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

        @greenpeter2 that would be a nat reflection.

        If you have a routed /29 why you not just put those right on the devices, and then just firewall what want to allow vs doing any nat on those IPs?

        https://docs.netgate.com/pfsense/en/latest/recipes/route-public-ip-addresses.html#routing-public-ip-addresses

        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
        • G
          GreenPeter2
          last edited by

          Sounds perfect.
          I didn't know pfsense had the technology.
          Thanks

          1 Reply Last reply Reply Quote 0
          • G
            GreenPeter2
            last edited by

            Hi johnpos,
            I completed the NAT Reflection setup.
            It works as advertised both on Port Forward and 1:1 NATs
            Perfect result.
            Thanks

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