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
Solved

Setup NAT Linux Box

Posted on 2000-03-04
5
204 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
  • 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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 how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

809 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