There is only one table on the server - "nat" and it contains only two chains: "prerouting" and "postrouting". IP forwarding is enabled. I'm trying to set more specific conditions for the source nat rule. When I set the classic rule :
nft add rule nat postrouting ip saddr 192.168.1.0/24 oif eth0 snat 220.127.116.11
everything works fine. But I'd like to specify also the interface where it's located for the network "saddr 192.168.1.0/24".
nft add rule nat postrouting **iif eth1** ip saddr 192.168.1.0/24 oif eth0 snat 18.104.22.168
When I enter this command, the program accepts it and the rule appears in the table. But the traffic doesn't go. Does anyone have any idea why?