Solved

Setup NAT Linux Box

Posted on 2000-03-04
5
206 Views
Last Modified: 2013-12-16
How to setup a NAT-Linux Box (RedHat 6.1) by using ipchain?

Thanks.
0
Comment
Question by:chanmh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

by:mjn020200
ID: 2584605
first, you would like to make ipchain rules. i suggest you give us what kind of NAT you would like to create. sorry.
0
 

Author Comment

by:chanmh
ID: 2584950
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
 
LVL 12

Accepted Solution

by:
j2 earned 50 total points
ID: 2585206
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
 

Author Comment

by:chanmh
ID: 2608800
Thanks.  But how to setup a caching DNS on my linux box?
0
 
LVL 12

Expert Comment

by:j2
ID: 2609104
http://electron.phys.dal.ca/DNS-HOWTO.html

chapter 3 deals with what you need.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question