My goal is to forward packets from an interface to another interface without source port conflicts using the right feature, NAPT.
I couldn't find how to add a NAPT rule (Network Address Port Translation or also known as PAT) with iptables
and nftables
.
More interestingly, searching combinations of PAT NAPT iptables/nftables/netfilter
doesn't give anything relevant. Even when they mention PAT/NAPT, they do a simple IP masquerading...
Edit
It seems iptables's NAT does implicit port translation... somehow it's obvious for everybody even though it isn't written anywhere. The definition of NAT is however pretty clear and doesn't include a layer 4 alteration. Whatever...