How do I perform static nat

Hi,

I need to be able to access a server from the internet, I would normally perform this function using static NAT to translate the public IP to a private one.

I cannot figure this out though, can someone assist?

Thanks

I assume that you want to open just certain ports. You can achieve it through port forwarding. I don’t have access to Luci to provide screenshots but it’s under Firewall section.

You can add the rule also manually into /etc/config/firewall - e.g. rule to forward the HTTP traffic:

config redirect
        option target 'DNAT'
        option src 'wan'
        option dest 'dmz'
        option proto 'tcp'
        option src_dport '80'
        option dest_ip '192.168.1.130'
        option dest_port '80'
        option name 'HTTP to internal web server'

And then restart the firewall (e.g. /etc/init.d/firewall restart)

If you need to forward more ports you would repeat it for any other port you want to open.

What I want to do is not port forward but NAT, Network Address Translation

EG
192.168.1.2 <-> 1.2.3.4 

I will firewall the ports I don’t need open but don’t want to have to forward all the ports

EDIT: Found this link, not sure if this is exactly what I need but found PREROUTING and POSTROUTING don’t exist on the omnia