|
Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
|
|
|
|
|
How to build a gateway
5 July 1999
|
|
|
This article shows you where to get some of the information needed in order to build a
gateway. This will allow your computers to share a single connection to your ISP. I've
just thrown this article together from other documents I've written. It should
work. But if it doesn't, please add your comments and give me a hard time
about it. Please remember to point out the problem you had. |
|
|
Gateway?
|
| A gateway allows one computer to talk to an outside network and channel requests from
other computers. If you have more than one computer, it makes sense to have one of
them act as the gateway to your ISP. It allows all of your computers to share a
single modem. It's easy and it's cheap. I will assume that you are using a dial-up
connection. But if you have a cable modem or ADSL, don't worry, this is pretty much
the same for you too. |
|
|
Install FreeBSD
|
The first thing you should do is install FreeBSD. There are several guides:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html
Installing FreeBSD on a Windows 95 machine
Installing FreeBSD to replace Windows 95
http://www.freebsd.org/~rpratt/31
So, let's continue and assume you have 3.2-Release (or similar) installed. |
|
|
Making it a gateway
|
| To make a FreeBSD box into a gateway, you need to add this to /etc/rc.conf: |
gateway_enable="YES" # Set to YES if this host will be a gateway.
|
|
|
Enabling PPP
|
To get PPP going, you should see:
ppp.php
|
|
|
Aliasing or NAT
|
Because you are using PPP, you'll want to add the alias option in order to translate
the private addresses to public addresses.
alias.php
If you are using a cable modem or ADSL, you'll want to perform NAT. See:
ipnat.php
|
|
|
Configure the clients
|
The next step is to make the other machines on the network talk to the gateway.
This is done by adding the following line to /etc/rc.conf:
defaultrouter="10.0.0.1"
You should replace 10.0.0.1 with the actual IP address of your gateway. NOTE: you
want the IP address given to your network card, which is not necessarily the one given to
you by your ISP. It might be something like 192.168.0.45 or 10.0.0.1.
After making the above change, you should reboot.
For Windows, look under Control Panel->Networks->Protocols->TCP/IP->Default
Gateway. |
|