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

Internal Server from internal network with DNAT

Hi,

we have the following needs:

We want to be able to access an externally avilable service (api.example.com) from the internal servers whereas the external service is a NAT-SLB (Server Load balancing) and the the internal servers handling this services are on the same subnet, so we ran into the problem that the answer is not rerouted through the NAT. There is a solution: UTM: Accessing Internal or DMZ servers from Internal Networks using DNAT

The problem i see. When using the No. 1 DNS solution (which would work for us) we loose the ability to internally load balance that service.

Is there any way to also load balance this traffic internally???


This thread was automatically locked due to age.
  • If you just create the full-nat rule as is explained on the same page, doesn't that work for you?
  • I didnt tried that (it should work) but the problem is pt. 8 where i have to choose a single server. instead i want to be able to choose 2 or more there to still have those internal connections balanced!
  • You could just enter a DNS host or an Availability group as the destination (instead of a static single Host).
    I think the DNS Host should load balance, whereas the Availability group does only route to the first available host in the group if I recall correctly.
  • But how can i add multiple IPs to a DNS Host? Or do you mean adding a DNS Group as the destination and add all backend apaches to that DNS group?
  • I'm thinking that the problem is that the packet is already in the FORWARD chain and cannot be re-inserted into the INPUT chain.  What does Sophos Support say?

    Cheers - Bob
  • A DNS host will load balance based on the lifetime of the TTL, so all requests at any given interval will be forwarded to the same host. Instead, I'd recommend using server load balancing, rather than just a straight DNAT/Full NAT rule. Or preferably, if it's HTTP/S, then use webserver protection, which will offer additional protection for your servers. 

    Both features should allow your internal and external users to access the same IP/hostname, and balance those requests to multiple internal servers. They also provide failure detection, and will stop forwarding requests to unresponsive back-end hosts.
  • Haven't asked the Support yet, but ill do so now and report back here.
  • Of course, Alan - we were trying to fix his solution instead of solving his problem.  Just define a new LB on the Internal interface and arrange for the FQDN to resolve to that in his LAN.

    Cheers - Bob
    PS But I'd still be interested in knowing if it's possible to insert a packet into the INPUT chain out of the FORWARD chain.
  • Packets hit the INPUT chain when they're destined to go to the UTM itself, but DNAT occurs pre-routing, so if DNAT decides to send a packet originally sent to the UTM, to some other target, then the packet won't hit the INPUT chain, but the FORWARD chain.