Article 4WV3C Converting from iptables to nftables syntax

Converting from iptables to nftables syntax

by
lonesoac0
from LinuxQuestions.org on (#4WV3C)
Hello all,

I am trying to convert the commands of:
Code:iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPTto nftables command syntax.

Code:nft add rule ip nat POSTROUTING oifname "eth0" counter masquerade

nft add rule ip filter FORWARD iifname "eth0" oifname "wlan0" ct state related,established counter accept

nft add rule ip filter FORWARD iifname "wlan0" oifname "eth0" counter acceptI keep getting the error codes that look like:
Error: Could not process rule: No such file or directory
add rule ip filter FORWARD iifname wlan0 oifname eth0 counter accept
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

What am I missing?latest?d=yIl2AUoC8zA latest?i=TY6pS1WnFuU:HRC5jRW69aY:F7zBnMy latest?i=TY6pS1WnFuU:HRC5jRW69aY:V_sGLiP latest?d=qj6IDK7rITs latest?i=TY6pS1WnFuU:HRC5jRW69aY:gIN9vFwTY6pS1WnFuU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments