This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't access NAT'd host externally

Hi, I have a new UTM that I'm trying to configure with some NAT'd DMZ hosts.

Right now I have:

  •  eth0: LAN -> Masq to the UTM's public IP
  •  eth1: WAN -> public IP range
  •  eth2: DMZ -> NAT range 10.24.1.1/24


I've set up my first DMZ host on the eth2 switch with a 10.24.1.* address and a DNAT rule from its WAN IP -> NAT IP. I can access the NAT host by its public IP from my LAN and the NAT rule appears in the firewall log since I have "log initial packets" set for the DNAT rule.

The problem, however, is that when I try to access the DMZ host by its public IP from an external source I can't connect and no firewall logs appear, neither NAT confirmations nor firewall blocking logs. Since there's no feedback from the firewall, I kinda think that it may be a routing issue, but I don't know how to check or troubleshoot that.

Any ideas or further troubleshooting steps?


This thread was automatically locked due to age.
  • Hi, wesm, and welcome to the User BB!

    I wonder if your problem isn't what I call Rule #4:

    When creating DNATs for traffic arriving from the internet, in "Going to:" always use the
    "(Address)" object created by WebAdmin when the interface or the Additional Address was defined.
    Using a regular Host object will cause the DNAT to fail as the packets won't qualify for the traffic selector.



    Once you fix that, the DNAT won't work for accesses from "Internal (Network)" and you'll need the article BarryG suggested earlier in the thread.

    Cheers - Bob
  • Hi, Bob, thanks for replying. 

    For my DNAT rule, I don't have an auto-created "(Address)" object since I'm not redirecting all of an interface's traffic and I didn't add an Additional Address. I just want to DNAT one of my WAN addresses to this one private DMZ address, so I created definitions for both NAT and WAN addresses of the host and use those in my DNAT rule. Shouldn't Internet traffic bound for the WAN IP I've defined match my DNAT rule?

    Perhaps I should clarify what my end goal is here. I'm currently in the process of migrating ISPs. As I have a good number of DMZ hosts, each with their own set of public IPs, this means a lot of work for me changing all of their network settings. I hope to avoid this in the future by defining a private network for my DMZ hosts and managing the translation between public addresses and private addresses solely on the firewall. Thus, the next time I migrate ISPs, I won't be forced to reconfigure all of my DMZ hosts; the transition will be transparent to them.
  • Hi, you need to define an Additional Address on your WAN NIC, or none of this is going to work.

    If you have a large DMZ, I would say you should get your own IP block from your region's NIC registry (ARIN, RIPE, et al), but my understanding is there aren't many IPv4 blocks available.
    If you could get one, then you wouldn't need NAT, and moving between ISPs would be simpler.

    Barry
  • Great idea, Barry!  Wesm, the Border Gateway Protocol capability makes it a piece of cake to change ISPs (although the smaller ones may not support it).

    Shouldn't Internet traffic bound for the WAN IP I've defined match my DNAT rule?

    Only if you break what I call Rule #3:

    Never create a Host/Network definition bound to a specific interface.
    Always leave all definitions with 'Interface: >'.


    The best-practice, right solution at present, as Barry said, is creating Additional Addresses on the External Interface, and then using the "(Address)" objects created by WebAdmin.  Binding definitions to an interface to accomplish this is definitely not an accepted practice.

    Cheers - Bob

  • Okay, so for each of my NAT hosts I need to:
    [LIST=1]
    • Add an Additional Address on eth1
    • Make a host definition for the NAT IP
    • Make a DNAT rule for external traffic to access the host
    • Make a SNAT rule so the host can access the Internet with its assigned IP
    • Adjust my imported firewall rules if necessary
    [/LIST]

    And do that for each of my 30+ IPs? D: That's a lot of clicking around... Is there a mass-edit or macro system?
  • In V9, you can use 1-to-1 NATs, and that could do what you want, depending on your public IP range.  Even then, I like Barry's suggestion while we're still stuck with IPv4.

    Cheers - Bob