This article provides step-by-step instructions for configuring 1-to-1 NAT on Teltonika RUTX routers. This setup allows mapping one external (WAN) IP address to one internal (LAN) IP address—commonly used to expose services (e.g., email servers, PLCs, HMIs) to the Internet while maintaining secure LAN communication.
Firmware Note: This guide is based on firmware version R_00.07.02.1 or newer. For firmware 7.13.1+, additional packages may be required (see below).
Tip: If you can't find certain settings in the WebUI, make sure Advanced Mode is enabled. Click the “Basic” button at the top-right corner of the WebUI to toggle modes.
This method uses source NAT (SNAT) and destination NAT (DNAT) rules to forward all incoming WAN traffic to a LAN device. It exposes the server (or PLC/HMI) entirely to the WAN, bypassing WAN firewall restrictions, so please ensure that only required ports are open on the internal device(s).
From version 7.13.1, support for NETMAP-based NAT rules requires an optional package.
Assign fixed IPs to both the router's WAN and LAN interfaces, as well as to the connected LAN devices. In this specific example, we are using a PLC and HMI connected behind a Teltonika RUT241 router.
10.1.100.250192.168.1.1192.168.1.2192.168.1.310.1.100.250 and netmask to 255.255.255.0By default, the RUT241 uses a single WAN IP (e.g., 10.1.100.250). If you need to map multiple LAN devices (such as a PLC and HMI) using 1:1 NAT, you will require additional IPs from the same WAN subnet (10.1.100.0/24). These additional WAN IPs will serve as external identities for internal devices.
192.168.1.2 ⇄ WAN IP: 10.1.100.2192.168.1.3 ⇄ WAN IP: 10.1.100.310.1.100.250wan_plc or wan_hmi).10.1.100.2 for PLC mapping10.1.100.3 for HMI mappingeth0.2).Repeat these steps to add both additional WAN IPs:
wan_plc → IP: 10.1.100.2wan_hmi → IP: 10.1.100.3Once configured, these WAN IPs can be used for NETMAP 1:1 NAT mappings, allowing any device in the 10.1.100.0/24 network to access the PLC and HMI via their respective external IPs.
Now you'll add NETMAP-based custom firewall rules to implement bi-directional 1-to-1 NAT.
#Templates
#Using PLC as device in this case
iptables -t nat -I PREROUTING -d [PLC'S_WAN_IP] -j NETMAP --to [PLC'S_LAN_IP]
iptables -t nat -I POSTROUTING -s [PLC'S_LAN_IP] -j NETMAP --to [PLC'S_WAN_IP]
#If you want to Access Router from external IPiptables -t nat -I PREROUTING -d [ROUTER'S_WAN_IP] -j NETMAP --to [ROUTER'S_LAN_IP]
iptables -t nat -I POSTROUTING -s [ROUTER'S_LAN_IP] -j NETMAP --to [ROUTER'S_WAN_IP]
# PLC Mapping: WAN IP to PLC
iptables -t nat -I PREROUTING -d 10.1.100.2 -j NETMAP --to 192.168.1.2
iptables -t nat -I POSTROUTING -s 192.168.1.2 -j NETMAP --to 10.1.100.2
# (Optional) HMI Mapping: If you want a second WAN IP to reach HMI, you'll need another WAN alias or static public IP
# Example:
# iptables -t nat -I PREROUTING -d 10.1.100.3 -j NETMAP --to 192.168.1.3
# iptables -t nat -I POSTROUTING -s 192.168.1.3 -j NETMAP --to 10.1.100.3
Click Save to apply the rules.
root using your router credentials/etc/init.d/firewall restartiptables -t nat -L -n -v | grep NETMAPLet us know if you're ready to proceed to the next step (e.g., mapping to HMI or using port-based forwarding instead of NETMAP).