Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

Setup NAT Linux Box

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

Thanks.
0
chanmh
Asked:
chanmh
  • 2
  • 2
1 Solution
 
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
 
j2Commented:
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
 
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

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now