Subject: Re: gateway
To: None <lime@lab.net>
From: Jon Lindgren <jlindgren@espus.com>
List: port-mac68k
Date: 07/18/2000 06:30:57
On Mon, 17 Jul 2000 lime@lab.net wrote:

> i can ftp and telnet into my netbsd from other computers on my lan.
> my ppp scripts connect the modem and give me a local and remote IP
> address. I can ping the remote address. However, I can't ping any
> other internet addresses, or ftp or telnet into the machine over
> the internet.
> 
> if i add nameservers to resolv.conf, any command such as ping or
> telnet, or any attempt to ftp in from the lan, waits (looking for
> the name server?) about 3 minutes or so before running.
> 
> could these be related and can you figure what might be causing
> them? i have tried to follow the ppp setup instructions as 
> closely as possible.

So, basically you want to use your dialup connection to serve many
machines, right?

If so:

1) First of all, the machine which runs ppp has to be the default gateway
for every other machine who needs net access.  This way, when network
traffic needs to go somewhere other than the local network, it'll flow out
to the internet.  On NetBSD machines, this can be done by the
"route" command, or by setting /etc/defaultrouter to an IP address of the
default route.

2) The PPP box will most likely have to run NAT, unless all of your other
machines are on registered IPs (unlikely).  Check out the NetBSD
documentation section for a description of firewalls.  It all boils down
to having to add about 3 lines to the /etc/ipnat.conf file.  Easy as pie.

Of course, if you don't want telnet, ftp, etc... access and just want www
access, you could use squid or a similar http proxy.

Hope this helps,

-Jon
 --------------------------------------------------------------------
 "Hey - this old machine screams like a snail on acid!" - (a true
  comment by a fellow who recently installed NetBSD on an old server)