nat041.txt NAT (Network Address Translation) for Minix (32 bit) and Minix-vmd Claudio Tantignone NAT for Minix 32 bits ===================== Introduction ------------ This is an implementation of NAT for Minix. This code ONLY works in standard Minix 2.0.2/2.0.3/2.0.4 32 bits, and Minix VMD 1.7.0. Before attempt to use NAT, you must compile your kernel with networking to be sure that you have no problems in your configuration, and be able to boot it. In VMD and 2.0.3/2.0.4 you must know how to recompile inet task. I supplied some configuration information and examples. You need to adapt the configuration examples to your specific configuration. If you are using Minix 2.0.3 I suggest to upgrade to 2.0.4. I have no 2.0.3 working now and I can not test any problem in that version. Disclaimer ---------- This software is offered "as is" in the hope that it will be useful. The author is not responsible for any damage to your system, your person, or anything caused by use and misuse of this software. Instalation ----------- NAT means Network Address Translation. It uses standard TCP/IP routing to deliver the packets. If you have experience configuring routing under TCPIP you will have no problems. If you never configure a small network with routers I suggest you do not try these configurations until you read some documentation. The basic document you need to understand is RFC1631. The supplied Makefile does not replace any code in your running system. It only compile the natcfg tool and installs the man page. You must copy by hand the system files and recompile the kernel. Check the directories you need to copy in order to have NAT working in your system. You first must save the inet files, so you can return the system to a known state if you have problems. Check the README file into the directories 2.0.2, 2.0.3, 2.0.4 and VMD. I do not supply an automatic way to replace the files to avoid missing important files. You must be carefull saving your original files. You are the only responsable of your machine. After the copy, recompile all the kernel image or inet task, move the new image to the boot directory if necesary, and reboot. After your reboot, you can start configuration. If you have NAT 0.2 (in std Minix 2.0.2 only) you need to replace only the ip_nat.c and ip_nat.h files to have the new functionality. ip_nat.c implement the nat code, you can edit and modify the defaults you have if you need to increment the nat table. The define you need to change is NAT_NR. See the details into the same file. The Makefile compiles the command natcfg and installs it. Also it install the man page. This is common for all Minix versions. You install the command typing # make install If natcfg does not work, it is possible that you do not compiled your kernel, or do not reboot with the new image. natcfg -s shows you the disable state if the code is compiled but it is not configured. I suggest first read all the documentation, print the commands man page and draw your configuration. Define the needed routes and define also which interface will be the public one for NAT. There are a lot of commands to execute, so create scripts. May be possible that you need to reboot several times, and it is very easy to confuse the order of the commands. Once the configuration works, try to document it for future reference.