Discussion Locked

Port Address Translation Linux RH 9/8

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Port Address Translation is a way by which 1 public ( static ) ip can be shared to host of network users. ( Mostly done in Router's )

Is it possible to do PATTing ( PAT ) in Linux RH 9 box. if yes please elobrate how ?

4 replies

by jeremywhiting

If you are talking about using a redhat 9 box as a router/gateway from one network to another, one way to do this is to use IP Masquerading where the linux box translates the ip address of the computers in the local network to its own, sends them out and when the replies come back it translates them back to the LAN address.

It is a fairly straightforward thing to set up ip masquerading. Look at www.tldp.org/HOWTO/IP-Masquerade-HOWTO/index.html
I used this to set up a redhat box as a routerin this way.

Good luck.

by lordinfidel

expounding on what the previous poster said.

IPMasquerade is not really needed anymore on the 2.2+ above kernels with IPTables.

IPChains yes, IPTables no.

This is now achieved with pre-routing and post-routing.

Destination Nat (DNAT) will translate a port like 80 and send it to an internal address.

If you want to do this very easily without having to know the actual syntax.

Get yourself fwbuilder (fwbuilder.org). Assuming that you have a RH box with gnome installed. download 5 things from their downloads page, gtkmm and libsig are listed on their page as direct links, no need to try and find them on freshrpms.

You can graphically set up your firewall and then compile it for IPTables. If you look a the NAT table, you can easily achieve what you are trying to do.

But if you want to code it yourself. Get Buidling Linux Firewalls from New Riders by Robert Ziegler. It will cover all of the synatx you need for DNAT.

This discussion is closed to new replies.