building a routing machine

Paul Chvostek paul+fbsd at it.ca
Thu Jul 17 21:10:38 PDT 2003


On Fri, Jul 18, 2003 at 03:56:53AM +0000, Frans-Jan v. Steenbeek wrote:
> 
> my webserver has two LAN-cards, my desktop has one. My question is: how
> do I connect these two with eachother so that both PC's can reach
> internet?
> 
> I've enabled routed on both systems, (-s on the webserver, -q on the
> desktop) but that doesn't seem to be enough. I've read something about
> routing and gateways in the handbook, but I didn't quite get it. So can
> anyone help me out?

You'd only use routing if each PC had a public IP address, and one
address was routed (upstream from your pair of machines) to the other.
If you have only one IP address, that address needs to be on the server
with two NICs, and you need to set up a *private* network for the
communication between your two machines.  You'll sort of turn your web
server into a firewall, rather than a router.

To connect to the Internet in general from your desktop, you'll probably
want to run natd.  The man page for natd should be your starting point.

-- 
  Paul Chvostek                                             <paul at it.ca>
  it.canada                                            http://www.it.ca/
  Free PHP web hosting!                            http://www.it.ca/web/



More information about the freebsd-questions mailing list