Setup NAT Linux Box

How to setup a NAT-Linux Box (RedHat 6.1) by using ipchain?

Thanks.
chanmhAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
j2Connect With a Mentor Commented:
easy way

echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -A forward -s 192.168.1.0/24 -b -j MASQ

Then set the clients to use the linux as default GW, and enter the DNS addressses of your ISP on each client. Or set up a cahcing DNS on your linux and use that as DNS.

Done. (this is assuming you are using 192.168.0.x with a 255.255.255.0 netmask.)

If you do not have ipchains installed, download from www.rustcorp.com (but 'all' modern distros have ipchains included)


Or you could download pmfirewall from www.pointman.org and it will also give yo ua pretty good firewall (just remmeber to answer "yes" for "Will this machine masquerade for other systems?"
0
 
mjn020200Commented:
first, you would like to make ipchain rules. i suggest you give us what kind of NAT you would like to create. sorry.
0
 
chanmhAuthor Commented:
For IP sharing - i.e. using a Linux Box for dialup to ISP and share this connection with a small group of PCs to connect to Internet.
0
 
chanmhAuthor Commented:
Thanks.  But how to setup a caching DNS on my linux box?
0
 
j2Commented:
http://electron.phys.dal.ca/DNS-HOWTO.html

chapter 3 deals with what you need.
0
All Courses

From novice to tech pro — start learning today.