How do I perform static nat


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?


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 ''
        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 <-> 

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