

So a packet from 192.168.3.x must get src-nated to, say, 10.168.3.x, and the policy's src-address must be 10.168.3.x at your side. ip address add address=10.10.55.172/32 interface=wan If so, bear in mind that the src-nat (in your case, the netmap action in srcnat chain) comes first, and then comes the policy matching. Src-address=192.168.0.0/24 to-addresses=10.0.0.If we use private ip in our server and want to access that server from internet then we need to set 1 to 1 netmap bellow are the configuration of netmap, you just need to change the public IP, Private IP and WAN interface name as per your configuration. Src-address=192.168.0.4/32 ip firewall nat> add action=src-nat chain=srcnat \ To add SRC-NAT rules allowing the internal server to talk to the outer networks having its source address translated to 10.0.0.216, while translating other internal hosts' source addresses to ip firewall nat> add action=src-nat chain=srcnat \ Add DST-NAT rule allowing access to the internal server from external ip firewall nat> add action=dst-nat chain=dstnat \ĭst-address=10.0.0.216/32 to-addresses=192.168.0.4Ĥ. You should specify the address that the router will be using while talking to the outer ip route> add gateway=10.0.0.1 prefsrc=10.0.0.217ģ. Add the default route to the router, but be aware of having two addresses. To setup the router follow the steps listed below.ġ. In this example we will 'full NAT' the internal address 192.168.0.4 to the external 10.0.0.216 one while keeping 10.0.0.217 for the router itself as well as for masquerading the internal network.

Let us assume two addresses (10.0.0.216 and 10.0.0.217) are assigned to the router. This lets computers on LAN share public IP addresses. Using Network Address Translation (NAT), private IP addresses on LAN are replaced by public IP addresses.
