74.17. How to configure the NAT loopback

The NAT loopback permits the access of a service via the public IP address from inside the local network.

Suppose to enable the the navigation of the 192.168.1.0/24 network. See the section: Section 74.15, “How to share a single Internet connection among multiple computers”.

Suppose to enable the accesses from the Internet to WEB and FTP servers. See the previous section: Section 74.16, “How to access IP hosts and services which are behind a NAT manager (port forwarding)”.

To access the servers WEB and FTP via the public IP from the local network, is needed to configure the NAT-LOOPBACK.

Enter into the Abilis control-program or open the configuration file with the Console configurator and type the following commands.

 Activate the NAT resource.
s p nat nat-loopback:yesEnable the NAT loopback.
a nat pr:0 inat:in onat:out add:src snet:192.168.1.0/24 anet:80.80.80.80/32 pat:yesAdd a NAT entry for the 192.168.1.0/24 network.
a nat pr:1 inat:out onat:in add:dst dnet:80.80.80.80/32 anet:192.168.1.10/32 pat:yes prot:tcp dpo:8080 apo:80Add a NAT entry for the access to the WEB server.
a nat pr:2 inat:out onat:in add:dst net:80.80.80.80/32 anet:192.168.1.20/32 pat:yes prot:tcp dpo:8021 apo:21Add a NAT entry for the access to the FTP server.
save confSave the configuration.

On a working Abilis, you must execute the initialization command init res:nat.

[Warning]Warning

The NAT loopback has however restrictions:

  • In DST translations (ADD:DST) there must be SNET:* and SPO:*.

  • In SRC translations (ADD:SRC) there must DNET:* and DPO:*.