How to setup ip mapping 1:1 nat on OpenWrt?

i want to configure this photo setting to openwrt how to use iptables to configure that setting like the screenshot ? thanks in advance

Please provide more information:

  • Your screenshot shows the same Local and Public IP, this is incorrect
  • Please identify the Interface name that possesses the Public IP
  • Please identify the Local Interface (e.g. lan)

I think the screenshot doesn't show any OpenWrt webinterface.

1 Like

Correct, the OP wants to know how to configure this in least from what I understood.

1 Like

Public interface that has public ip pppoe-wan
Local interface br-lan
I setup secondary ip lan in modem with which is gataway that i purchased from isp
And use multi ip nat like photo these are ip i purchased

Does your modem-router support static routes? Then you should add a static route to the LAN subnet of the openwrt router. Which hopefully allow you to configure IP Address mapping on the modem-router using IP addresses from the LAN subnet of the openwrt router as "Local Start IP". Otherwise you will get double NAT 1:1.

(Iptables should support 1:1 nat using SNAT and DNAT targets. Openwrt has firewall redirect, but the wiki doesn't mention anything abount 1:1 nat, and I haven't tried it.)

1 Like