Secure OS Software for Linux
1753434 Members
4574 Online
108793 Solutions
New Discussion юеВ

Re: Natting with Redhat linux8

 
Raghavendra_5
New Member

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)

Thanks,
Raghu
2 REPLIES 2
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 205.254.211.17 via 192.168.100.17
# ip rule add nat 205.254.211.17 from 192.168.100.17

See this link:

http://linux-ip.net/html/nat-stateless.html
Support Fatherhood - Stop Family Law
Jean-Pierre Denis
Valued Contributor

Re: Natting with Redhat linux8

Hi,

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.

Thanks,
JP
Open your Mind and use Open Source software...