I have an email server behind a firewalld router. Port forwarding works fine but the IP address of the sending host is lost. I'm looking but not finding how to do destination NAT for inbound traffic.
Thanks
Edit:
This: http://www.mjhall.org/centos7-firewalld-nat-router/
Seems to say something like this:
Code: Select all
firewall-cmd --direct --add-rule ipv4 nat POSTROUTING 0 -o eth1 -j MASQUERADE
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth2 -o eth1 -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth1 -o eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT