Date: Sat, 22 Aug 1998 19:42:39 -0700 From: Gregory Sutter <gsutter@pobox.com> To: Chris Martino <chrismar@peanut.readington.com>, freebsd-questions@FreeBSD.ORG Subject: Re: Networking: Subnets Message-ID: <19980822194239.P924@notabene.zer0.org> In-Reply-To: <Pine.BSF.3.96.980822201315.1615A-100000@peanut.readington.com>; from Chris Martino on Sat, Aug 22, 1998 at 08:19:39PM -0400 References: <Pine.BSF.3.96.980822201315.1615A-100000@peanut.readington.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 22, 1998 at 08:19:39PM -0400, Chris Martino wrote: > Hi, I just got the okay from my ISP for a 6 host subnet to use for my LAN, > but I seem to be havinging a hard time understanding how to implament it. > > I currently connect using ppp0 on FreeBS. I think have my FreeBSD box > plugged into the "Uplink" port on my hub, which is also where the other > machines are connected to. > > Now, will my freebsd box have 2 IPs (one for ppp0 and one for fxp0) or > will it just have one? Thats really the only thing I'm not sure about > since I do want to use the freebsd box as I guess it would be a router and > a gatweay. It will indeed have two IPs, an "inside" IP (on fxp0, only visible to hosts on your localnet) and an "outside" IP on ppp0. In your /etc/rc.conf, set gateway_enable to "YES". Your freebsd box will be the gateway for all the other machines on your localnet. If you have named (DNS) running, make entries for the machines in the localnet. If not, edit /etc/hosts and put in ip addresses, according to the RFC 1918 note in the file, for each machine on your localnet. In your ppp.conf, turn on the aliasing options (man ppp for detail) so that packets will be translated to the correct place: alias enable yes alias deny_incoming no # alias log yes alias same_ports yes alias use_sockets yes alias unregistered_only yes On the other machines in the network, change the default gateway to the (inside) IP address of the router. For FreeBSD machines, it's in /etc/rc.conf: ### Network routing options: ### defaultrouter="10.0.0.1" # Set to default gateway (or NO). For windows machines, it's (I hope) ctrl panel, network, tcp/ip, gateway. Somewhere in there. Then restart the networking on all the machines, gateway first, and you should be in business. I'm writing this from a computer on my local network, connected to a FreeBSD box doing routing for the net via a ppp- connected modem. Works great, except strange packets for my cousins' Battle.net games keep getting killed by my firewall. Gotta fix that. :) A way to determine your IP each time you dialup, if it's dynamic, is netstat -ni | grep tun0 | grep 123.123.123 | awk '{print $4}' substituting, of course, your ISP's IP block for 123.123.123. If you have any more questions, LMK. Regards, Greg -- Gregory S. Sutter Bureaucrats cut red tape -- lengthwise. mailto:gsutter@pobox.com http://www.pobox.com/~gsutter/ PGP DSS public key 0x40AE3052 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980822194239.P924>