I'm looking for a way with firewall-cmd or another command to do the following.

An incoming public interface has multiple ip addresses bound to it. How can I forward ports only for one of the IP addresses?

bond0 - public: local machine SSHD bound here.  --->  forward  SSH, HTTPS  to vm bridge on machine 

I can use the --forward-port when I forward all incoming traffic on a given port, however I would like to do this only for traffic destined to one target IP.

Routing all traffic destined for .200 to the .53 vm would be the alternative, not sure how to accomplish that either.

$ firewall-cmd --zone=external \


Using "Rich Language" rule

Forward IPv6 packets received from 1:2:3:4:6:: on port 4011 with protocol TCP to 1::2:3:4:7 on port 4012:

rule family="ipv6" source address="1:2:3:4:6::" forward-port to-addr="1::2:3:4:7" to-port="4012" protocol="tcp" port="4011" Using the Rich Rule Log Command Example 5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.