Configuring a quick-and-dirty router and proxy

March 23, 2001, 11:30 AM —  LinuxWorld.com — 


Q: Maybe you can help. I want to set up my Mandrake 7.2 machine as a router and proxy with a 3Com 56K Message Modem (serial) as dialup-on-demand and a 3Com 3c509 Ethernet card.

A: Setting up a router and proxy is a huge subject, but I will give you the basics and some pointers to get you started. There are a couple of technical terms that you have to be familiar with. The first is "IP-Masquerading." If you refer to the IP-Masq-HOWTO located at the Linux Documentation Project Website (see Resources), it will tell you in Section 1.1: Introduction to IP Masquerading (or IP Masq for short) that:


IP Masq is a form of Network Address Translation, or NAT, that allows internally connected computers that do not have one or more registered Internet IP addresses to have the ability to communicate to the Internet via your Linux box's single Internet IP address. It is possible to connect your internal machines to the Linux host with LAN technologies like Ethernet, Token Ring, FDDI, as well as other kinds of connections such as dialup PPP or SLIP links. This document uses Ethernet for the primary example since it is the most common scenario.


In other words, you may use a single network interface to provide general Internet access to a private network. IP MASQ, then, is the baby brother of NAT.



NAT is different, though. It allows you to map external addresses or ports to internal addresses or ports. For example: I have a machine that is on a private network, but I want to allow the Internet direct access to the machine. You can use NAT to allocate a real IP address (say, 64.81.28.144) to your machine that is really located locally on 192.168.1.5. If you did this, anyone who connected to 64.81.28.144 would actually connect to the machine on 192.168.1.5. This can be very useful if you map specific ports.



Here are the basic steps that you will need to create an IP Masq gateway. I warn you, though, that these steps are basic and will do the job, but you will need to secure the firewall machine. I am not going to talk about how to make the PPP connection. If you are unsure about how to do this, take a look at the PPP-HOWTO (see Resources). I suggest using kppp or LinuxConf to set up the machine. Nor am I going to talk about setting up a basic network. If you are looking for information on that, you can refer to the Linux Networking HOWTO (see Resources).


Setting up IP Masq



IP Masq is very simple to set up. There are many ways to do it, so I'll show you

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff

Crimeware: Understanding New Attacks and Defenses
By Markus Jakobsson, Zulfikar Ramzan
Published Apr 6, 2008 by Addison-Wesley Professional. Part of the Symantec Press series.
Enter now! | Official rules | Sample chapter

Securing VoIP Networks: Threats, Vulnerabilities, and Countermeasures
By Peter Thermos, Ari Takanen
Published Aug 1, 2007 by Addison-Wesley Professional.
Enter now! | Official rules | Sample chapter

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources