How to handle multiple public IPs?

I set up an extra WAN ip in OpenWRT. Here is selected rows from /etc/config/network

ip addresses 83.68.2.9 and 83.68.2.10

config interface 'wan'
	option ifname 'eth3'
	option proto 'static'
	option ipaddr '83.68.2.9'
	option netmask '255.255.254.0'
	option gateway '83.68.2.1'
	option broadcast '83.68.2.255'

config interface 'wantest'
	option ifname 'eth3'
	option proto 'static'
	option ipaddr '83.68.2.10'
	option netmask '255.255.254.0'
	option gateway '83.68.2.1'
	option broadcast '83.68.2.255'

Now I would like to create what I think is called a biderectional nat between 83.68.2.10 and 192.168.1.10 so that:
Outgoing traffic from wan originating from 192.168.1.10 will come from 83.68.2.10
Incoming traffic from wan on 83.68.2.10 will be forwarded to 192.168.1.10

Can this be set up in Luci? Or do I need to edit the config files in some way?

Kind regards
Jens

nat's not so fancy luci will be fine... it's the two wan links that require additional directionality in the routing tables for that internal host... that would be config based route|rule ... or mwan probably...

1 Like

A DNAT and a SNAT are needed in addition to the interface. You could configure them from Luci too, DNAT is under Port forwards tab and SNAT is under NAT rules tab.

4 Likes

This looks spot on. Thanks @trendy will give it a go