Secure OS Software for Linux
Showing results for 
Search instead for 
Did you mean: 

Natting with Redhat linux8

Occasional Visitor

Natting with Redhat linux8

Hi ,
I'am raghu fairly new in Linux field.....Now I have a task of setting up Linux Firewall. I have configured basic firewall .... .
Now I want to do the Natting ....Its like this ... I've exchange server box.This box is in the Internal zone . The who wants to access exchange in the LAN can access it directly . But the people from outside needs to access this Exchange server box with a Valid IP (Public IP) . So How can I Nat the Internal IP to External IP (Public IP)

Michael Steele_2
Honored Contributor

Re: Natting with Redhat linux8

This is 'stateless NAT' using ip route and iproute2. For exmaple:

# ip route add nat via
# ip rule add nat from

See this link:
Support Fatherhood - Stop Family Law
Jean-Pierre Denis
Valued Contributor

Re: Natting with Redhat linux8


you could also use iptables and issue something like:

/sbin/iptables -A PREROUTING -t nat -i ppp0 -p tcp -d $INTERNET_IP --sport $UNPRIVPORTS --dport 25 -j DNAT --to-destination $MAIL_SERVER_IN

This would forward incoming connection to your mail server.

Open your Mind and use Open Source software...