I installed the latest build on my wrt3200acs and it does not seem to use iptables anymore.
How can I do the following rule in nftables?
iptables -t nat -A PREROUTING -s 192.168.1.17 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.16:80
iptables -t nat -A POSTROUTING -j MASQUERADE
You can create the first rule in LuCI using a Port Forwarding rule from Source Zone “lan” to any Destination zone with the external IP set as 192.168.1.17 and the internal destination as 192.168.1.16 port 80.
I’m not near a router to show an example, so I may be off in a detail or two, but it should get you started.
opkg install iptables-nft
Where would I put the rule using iptables-nft
Where did you put it before?
Just type the two commands in and see if it works.
There was a custom tab under firewall.
But it looks like it went in /etc/firewall.user
Try this rule in
/etc/config/firewall to achieve similar results:
option name 'Redirect http'
option src 'lan'
option dest '*'
list proto 'tcp'
option src_ip '192.168.1.17'
option src_dport '80'
option dest_ip '192.168.1.16'
option target 'DNAT'
Thank you for the help! This does not seem to be working.
Just so you know what I am doing. I am redirecting what my weather station sends to weather underground to a weather server(weewx) on my network. The iptables worked great but I am unfamiliar with nftabnles.