home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / LINUX / HOWTO / mini / ipmasq.txt < prev    next >
Text File  |  1997-07-07  |  52KB  |  1,370 lines

  1.   Linux IP Masquerade mini HOWTO
  2.   Ambrose Au, achau@wwonline.com
  3.   v1.00, 1 January 1997
  4.  
  5.   This document describes how to enable IP masquerade feature on a Linux
  6.   host, allowing connected computers that do not have registered Inter¡
  7.   net IP addresses to connect to the Internet through your Linux box.
  8.  
  9.   1.  Introduction
  10.  
  11.   1.1.  Introduction
  12.  
  13.   This document describes how to enable IP masquerade feature on a Linux
  14.   host, allowing connected computers that do not have registered
  15.   Internet IP addresses to connect to the Internet through your Linux
  16.   box.  It is possible to connect your machines to the Linux host with
  17.   ethernet, as well as other kinds of connection such as a dialup ppp
  18.   link. This document will emphasize on ethernet connection, since it
  19.   should be the most likely case.
  20.  
  21.        This document is intended for users using kernels 2.0.x.
  22.        Development kernels 2.1.x are NOT covered.
  23.  
  24.   1.2.  Foreword, Feedback & Credits
  25.  
  26.   First of all, I would like to let you know that I am NOT a
  27.   knowledgeable nor an experienced user of IP masquerade.
  28.  
  29.   I find it very confusing as a new user setting up IP masquerade on a
  30.   newer kernel, i.e. 2.x kernel.  Although there is a FAQ and a mailing
  31.   list, there is no document dedicates on that; and there are some
  32.   requests on the mailing list for such a HOWTO. So, I decided to write
  33.   this up as a starting point for new users, and possibly a building
  34.   block for knowledgeable users to build on for documentation. If you
  35.   think I'm not doing a good job, feel free to tell me so that I can
  36.   make it better.
  37.  
  38.   This document is heavily based on the original FAQ by Ken Eves , and
  39.   numerous helpful messages in the ip_masq mailing list. And a special
  40.   thanks to Mr. Matthew Driver whose mailing list message inspired me to
  41.   set up ip_masq and eventually writing this.
  42.  
  43.   Please feel free to send any feedback or comments to
  44.   achau@wwonline.com if I'm mistaken on any information, or if any
  45.   information is missing. Your invaluable feedback will certainly be
  46.   influencing the future of this HOWTO!
  47.  
  48.   This HOWTO is meant to be a quick guide to get your IP Masquerade
  49.   working in the shortest time.  The latest news and information can be
  50.   found at the IP Masquerade Resource web page that I maintained.  If
  51.   you have any technical questions on IP Masquerade, please join the IP
  52.   Masquerade Mailing List instead of sending email to me since I have
  53.   limited time, and the developers of IP_Masq are more capable of
  54.   answering your questions.
  55.  
  56.   The latest version of this document can be found at the IP Masquerade
  57.   Resource, which also contains the HTML and postscript version:
  58.  
  59.   ╖  http://www.wwonline.com/~achau/ipmasq/
  60.  
  61.   ╖  http://www.hwy401.com/achau/ipmasq/
  62.  
  63.   ╖  http://www.leg.uct.ac.za/mirrors/ipmasq/
  64.  
  65.   ╖  http://130.89.230.132/linux/ipmasq/
  66.  
  67.   1.3.  Copyright & Disclaimer
  68.  
  69.   This document is copyright(c) 1996 Ambrose Au, and it's a free
  70.   document. You can redistribute it under the terms of the GNU General
  71.   Public License.
  72.  
  73.   The information and other contents in this document are to the best of
  74.   my knowledge. However, ip_masq is experimental, and there is chance
  75.   that I make mistakes as well; so you should determine if you want to
  76.   follow the information in this document.
  77.  
  78.   Nobody is responsible for any damage on your computers and any other
  79.   losses by using the information on this document. i.e.
  80.  
  81.        THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES INCURRED DUE
  82.        TO ACTIONS TAKEN BASED ON THE INFORMATION IN THIS DOCUMENT.
  83.  
  84.   2.  Background Knowledge
  85.  
  86.   2.1.  What is IP Masquerade?
  87.  
  88.   IP Masquerade is a developing networking function in Linux. If a Linux
  89.   host is connected to the Internet with IP Masquerade enabled, then
  90.   computers connecting to it (either on the same LAN or connected with
  91.   modems) can reach the Internet as well, even though they have no
  92.   official assigned IP addresses.
  93.  
  94.   This allows a set of machines to invisibly access the Internet hidden
  95.   behind a gateway system, which appears to be the only system using the
  96.   Internet.  Breaking the security of a well set-up masquerading system
  97.   should be considerably more difficult than breaking a good packet
  98.   filter based firewall (assuming there are no bugs in either).
  99.  
  100.   2.2.  Current Status
  101.  
  102.   IP Masquerade is still at its experimental stages. However, kernels
  103.   since 1.3.x had built-in support already. Many individuals and even
  104.   companies are using it, with satisfactory results.
  105.  
  106.   Browsing web pages and telnet are reported to work well over ip_masq.
  107.   FTP, IRC and listening to Real Audio are working with certain modules
  108.   loaded. Other network streaming audio such as True Speech and Internet
  109.   Wave work too. Some fellow users on the mailing list even tried video
  110.   conferencing software.   Ping is now working, with the newly available
  111.   ICMP patch
  112.  
  113.   Please refer to section 4.3 for a more complete listing of software
  114.   supported.
  115.  
  116.   IP Masquerade works well with 'client machines' on several different
  117.   OS and platforms. There are successful cases with systems using Unix,
  118.   Windows 95, Windows NT, Windows for Workgroup(with TCP/IP package),
  119.   OS/2, Macintosh System's OS with Mac TCP, Mac Open Transport, DOS with
  120.   NCSA Telnet package, VAX, Alpha with Linux, and even Amiga with AmiTCP
  121.   or AS225-stack.
  122.  
  123.   2.3.  Who Can Benefit From IP Masquerade?
  124.  
  125.   ╖  If you have a Linux host connected to the Internet, and
  126.  
  127.   ╖  if you have some computers running TCP/IP connected to that Linux
  128.      box on a local subnet, and/or
  129.  
  130.   ╖  if your Linux host has more than one modem and acts as a PPP or
  131.      SLIP server connecting to others, which
  132.  
  133.   ╖  those OTHER machines do not have official assigned IP addresses.
  134.      (these machines are represented by OTHER machines hereby)
  135.  
  136.   ╖  And of course, if you want those OTHER machines to make it onto the
  137.      Internet without spending extra bucks :)
  138.  
  139.   2.4.  Who Doesn't Need IP Masquerade?
  140.  
  141.   ╖  If your machine is a stand-alone Linux host connected to the
  142.      Internet, then it is pointless to have ip_masq running, or
  143.  
  144.   ╖  if you already have assigned addresses for your OTHER machines,
  145.      then you don't need IP Masquerade,
  146.  
  147.   ╖  and of course, if you don't like the idea of a 'free ride'.
  148.  
  149.   2.5.  How IP Masquerade Works?
  150.  
  151.   From IP Masquerade FAQ by Ken Eves:
  152.  
  153.     Here is a drawing of the most simple setup:
  154.  
  155.        SLIP/PPP         +------------+                         +-------------+
  156.        to provider      |  Linux     |       SLIP/PPP          | Anybox      |
  157.       <---------- modem1|            |modem2 ----------- modem |             |
  158.         111.222.333.444 |            |           192.168.1.100 |             |
  159.                         +------------+                         +-------------+
  160.  
  161.       In the above drawing a Linux box with ip_masquerading installed and
  162.     running is connected to the Internet via SLIP/or/PPP using modem1.  It has
  163.     an assigned IP address of 111.222.333.444.  It is setup that modem2 allows
  164.     callers to login and start a SLIP/or/PPP connection.
  165.  
  166.       The second system (which doesn't have to be running Linux) calls into the
  167.     Linux box and starts a SLIP/or/PPP connection.  It does NOT have an assigned
  168.     IP address on the Internet so it uses 192.168.1.100. (see below)
  169.  
  170.       With ip_masquerade and the routing configured properly the machine
  171.     Anybox can interact with the Internet as if it was really connected (with a
  172.     few exceptions).
  173.  
  174.   Quoting Pauline Middelink:
  175.     Do not forget to mention the ANYBOX should have the Linux box
  176.     as its gateway (whether is be the default route or just a subnet
  177.     is no matter). If the ANYBOX can not do this, the Linux machine
  178.     should do a proxy arp for all routed address, but the setup of
  179.     proxy arp is beyond the scope of the document.
  180.  
  181.   The following is an excerpt from a post on comp.os.linux.networking which
  182.   has been edited to match the names used in the above example:
  183.      o I tell machine ANYBOX that my slipped linux box is its gateway.
  184.      o When a packet comes into the linux box from ANYBOX, it will assign it
  185.        new source port number, and slap its own ip address in the packet
  186.