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

Issues while creating a hairpin NAT

Hi folks,

another post on my issues about creating a firewall hairpin nat rule.

I have an NTP server on my network and I want devices to use it as a reference time source. I know the device works when I change network devices to query it for time, they update correctly.

When I built my own firewall rule using a linked NAT rule there was lots of queries to the rule but nothing was returned.

So, I have decided to use the XG build a server access rule.

I think one of the questions in the create wizard is wrong

It asks for the external source networks and devices, but never asks for the internal networks. You can add your internal networks which I did.

Next issue is the reflexive rule automatically created does not use the required service as entered in previous pages, just uses ANY which allows all traffic to bypass the specific NAT and linked NAT rules. Again you can change it to the required service.

Next issue is the created firewall rule appears to be wrong.

Destination zone is LAN but the destination network is the external interface which is a WAN zone.

The result is the rule does not work.

I have tried creating a FQDN for the external internal access to the NTP, but there is nowhere to add it to the rule along with a number of other issues of trying to add another external url for the same address, the XG does not like it.

Please advise what is required to make the hairpin NAT work. I have read the KBA and followed that document and ended up with the above issues.

Ian

.



This thread was automatically locked due to age.
  • Hi Lucar,

    no because the server Nat rule is at the top. Works well.

    ian

    XG115W - v19.5.1 mr-1 - Home

    If a post solves your question please use the 'Verify Answer' button.

  • Oh, you have a Server SNAT Rule? Ok thats what i suggested. 

    __________________________________________________________________________________________________________________

  • It has getting late when I posted this in here, and I forgot to talk about the creation of the secondary NAT Policy which allows the NTP Server to bypass the Redirect NAT Policy. (Access to the Internet.)

    I will write about this later, thanks for reminding me!


    If a post solves your question use the 'Verify Answer' button.

    XG 115w Rev.3 8GB RAM v19.5 MR1 @ Home.

  • Hi folks,

    the issue with my hairpin NAT rule for access to the internal server appears to an undocumented fix in v18.0.5 mR-5 build 586. The XG no longer corrupts the packets after about 2 or 3 hours.

    I have tried using the specific NTP internet destinations as suggested by Lucar, but failed because one of my dives has a hard coded NTP address for the old local LAN network.

    I have added a special network destination to cater for that device and added other destinations for none Apple devices.

    I am still puzzled why the XG decides to src_trans_port to values other than 0 for some packets?

    Ian

    XG115W - v19.5.1 mr-1 - Home

    If a post solves your question please use the 'Verify Answer' button.

  • Just do not use ANY as your destination, that seems to break the firewall rule after a number of hours. Using selected destinations fixes most access but some still show failure eg one device can send 4 or 5 requests and 2 or 3 will fail.

    Ian

    XG115W - v19.5.1 mr-1 - Home

    If a post solves your question please use the 'Verify Answer' button.

  • Just to double check: I updated the recommended read with screenshots of this configuration.

    https://community.sophos.com/sophos-xg-firewall/f/recommended-reads/118433/using-v18-nat-to-achieve-ntp-proxy-like-functionality

    Maybe there is some more feedback to it? 

    __________________________________________________________________________________________________________________