NAT translation from BSD to CentOS 7 with Firewalld

Issues related to configuring your network
Post Reply
PsychoFish
Posts: 5
Joined: 2015/03/11 12:39:18

NAT translation from BSD to CentOS 7 with Firewalld

Post by PsychoFish » 2016/02/19 07:36:51

On a BSD system we have a NAT configured as :

in /etc/ipn.conf

map em0 <remote branch IP range>/23 -> <IP address in local branch range>/32

I'm trying to replicate that on CentOS with direct rules

firewall-cmd --permanent --direct --passthrough ipv4 -t nat -I POSTROUTING -o eth0 -j DNAT -s <remote range>/23 -d <LOCAL IP>/32

Is this the right way to do it, or is there another way I should be doing this?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: NAT translation from BSD to CentOS 7 with Firewalld

Post by aks » 2016/02/19 15:57:39

firewall-cmd --zone=<zone_name_like_external> --add-masquerade
See http://www.certdepot.net/rhel7-get-started-firewalld/

Post Reply