OpenWRT GUI NAT Configuration

Dear Expert,

i am confused with the NAT setup in OpenWRT GUI. My setup as below:
Robot( -----------5G Modem with Static IP(<5G wireless> ----Application hosted in my VM server(

I need to allow robot to communicate to the VM and vice versa. My VM able to communicate to 5G modem, however when i tried ping to Robot from VM, it was not reachable. What could be wrong at my NAT configuration?

My NAT rule configuration at OpenwRT GUI:
Protocol: Any
Source Address:
Destination address:
Action: SNAT -Rewrite to specific source IP or port
Rewrite Ipaddress:

What is the right configuration for my VM to reach 5G modem and translate the IP to reach the Robot IP?

Any thing that i missed out here?

and lets see the results of 'ifconfig' from the device running the VMs

You need a redirect (DNAT) not SNAT.
An example for TCP port 443, outside zone is wan, inside zone is lan, adjust to your needs.

uci add firewall redirect
uci set firewall.@redirect[-1].dest='lan'
uci set firewall.@redirect[-1].target='DNAT'
uci set firewall.@redirect[-1].name='robot'
uci add_list firewall.@redirect[-1].proto='tcp'
uci set firewall.@redirect[-1].src='wan'
uci set firewall.@redirect[-1].src_dport='443'
uci set firewall.@redirect[-1].dest_ip=''
uci set firewall.@redirect[-1].reflection='0'
uci set firewall.@redirect[-1].src_ip=''
uci commit firewall
service firewall restart
1 Like