Score:1

NAT'ing a specific port not working on Ubuntu, works correctly on Fedora

lr flag

We have previously been running Fedora instances but for a few reasons we have needed to move over to Ubuntu based distros.

Previously, we have used the following firewalld rules in order to NAT specific ports and it worked flawlessly.

sysctl -q -w net.ipv4.ip_forward=1 net.ipv4.conf.ens5.send_redirects=0
firewall-cmd --permanent --direct --passthrough ipv4 -t nat -A POSTROUTING -p tcp --dport 587 -s 10.0.0.0/8 -j MASQUERADE

Now when we apply the same rules to firewalld on Ubuntu (22.04), they do not seem to have any effect. Our requirement is to only NAT specific ports.

The only difference we noticed between the fedora and ubuntu boxes was that the interface name changed from eth0 to ens5. We made that change in our command.

We have checked that they are being applied to the correct zone.

Any tips on where we may be going wrong would be greatly appreciated.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.