Solved

Setup NAT Linux Box

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now