LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using a Linux box as a residential gateway on my LAN (https://www.linuxquestions.org/questions/linux-newbie-8/using-a-linux-box-as-a-residential-gateway-on-my-lan-386166/)

LordFett 11-24-2005 12:26 PM

Using a Linux box as a residential gateway on my LAN
 
I have an older pc (AMD K6 500mhz with 368megs of ram) that I would like to use as a gateway for my LAN (I think thats what its called, modem --> linux box --> router --> rest of the network).

Right now I have Fedora Core 4 on the machine (tried SuSe 10.0 but it wouldn't install and Slackware (not sure of the version one of the newer) asked for the floppy boot disk to be inserted but I never had a floppy, the computer doesn't even have a floppy drive). If anyone has a suggestion for a distro to use, maybe an older version of SuSe? Since I have SuSe on the rest of my linux machines.

The PC i'm wanting to use at the gateway does have two nics installed and working. But when I hook it up to the modem and then the other nic to the router the rest of my pcs go off the internet.

I looked for a tutorial for this but couldn't find one. If tehre is already one can someone point me in the right direction?

Thanks

microsoft/linux 11-24-2005 02:34 PM

You need to look into IP Masquerading(Or NAT, network address translation). I'm assuming this is on a home network, where you only have one external IP address. If you have more than one external IP address(i.e. a business), I think you can just configure your other machines to use the IP of the machine you're trying to network access through as their gateway address. THis site has a good introduction to iptables(what is used for NAT), as well as some scripts that can be used. http://iptables-tutorial.frozentux.net/

Hope this helps

J.W. 11-24-2005 03:27 PM

You might want to take a look into Smoothwall, which is designed to do exactly what you describe

microsoft/linux 11-24-2005 03:51 PM

That's true, smoothwall is a specialized distribution that will aid in configuration and so forth, the url is www.smoothwall.org.

Netizen 11-24-2005 07:16 PM

Look at IPCop. www.ipcop.org

LordFett 11-24-2005 08:45 PM

Is smothwall a program to run within a linux distro? Or a distro of linux?

microsoft/linux 11-24-2005 09:12 PM

smoothwall is a linux distribution. If you're looking for a program inside of <your distribution of choice>, your going to need to look in to NAT/IP Masquerading.

xavistyles 12-21-2005 02:04 PM

can smoothwall work for home use via T-lan

james.farrow 12-21-2005 03:15 PM

Have a look at http://projectfiles.com/firewall/

I use their script for doing pretty much what you want.
Run the script then service iptables save so that the rules are 'loaded' at each boot.

floppywhopper 12-21-2005 05:20 PM

A number of Linux and BSD distros will do what you want
Smoothwall and IP Cop have been mentioned
and they are very good
IMO smoothwall is better
but IP Cop easier to set-up

however there are others

pfSense ( BSD based )
http://www.pfsense.org/

Astaro
http://www.astaro.com/

Devil Linux
http://www.devil-linux.org/home/index.php

Trustix
http://www.trustix.org/

Monowall ( BSD Based )
http://m0n0.ch/wall/

Note
they will all take over the whole system and delete any existing data, if you have anything on the HDD you want to keep, move it or lose it.

For a newbie I would recommend IP-Cop and then later if you decide you want something different you will have the experience.

READ the Manual first of any distro you choose !
VERY CAREFULLY
PRINT IT OFF and READ

here is the IP Cop manual
http://www.ipcop.org/1.4.0/en/install/html/index.html

cheers
floppy


All times are GMT -5. The time now is 07:53 AM.