Here is my problem which I have no solution although I have tried everything. We have a public server that accepts ssh connections from public and we want to forward ssh to another internal server and at the same time if the ssh is from a specific VLAN let say 10.16.20.X/24 to accept logins locally and does not forward them.
Tcp forwarding is working fine but login locally not. I have tried all combinations, add rich rules in external zone, adding rules to direct.xml, but nothing works.
Any suggestions please? Should I stop firewalld and try nftables?
Thank you for your answer. Just to clarrify that the server has only one network interface which is assign to external zone. How can I create a second zone without interface?
Zone may have interfaces and sources. (If it has none, then it is not is use.)
Every interface (with IP address) has to be in some zone, but zone does not need interface.
There is --add-source option. See man firewall-cmd