From owner-freebsd-newbies@FreeBSD.ORG Tue Dec 14 14:30:30 2004 Return-Path: Delivered-To: freebsd-newbies@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0497B16A4CE for ; Tue, 14 Dec 2004 14:30:30 +0000 (GMT) Received: from jail.idea-anvil.net (idea-anvil.net [63.226.12.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9243343D45 for ; Tue, 14 Dec 2004 14:30:29 +0000 (GMT) (envelope-from james@idea-anvil.net) Received: from mail.Idea-Anvil.net (vaio [10.0.0.99]) by jail.idea-anvil.net (8.12.11/8.12.9) with ESMTP id iBEEUWa9095337 for ; Tue, 14 Dec 2004 07:30:32 -0700 (MST) (envelope-from james@idea-anvil.net) From: James Organization: Jhai To: freebsd-newbies@freebsd.org Date: Tue, 14 Dec 2004 07:30:27 -0700 User-Agent: KMail/1.7.1 References: <41BDC787.40000@daleco.biz> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200412140730.27578.james@idea-anvil.net> Subject: Re: Home Network, step by step? X-BeenThere: freebsd-newbies@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Gathering place for new users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 14:30:30 -0000 Hi, On Monday 13 December 2004 10:48 pm, R. Scott Kennan wrote: > Ok, here's my setup: I have broadband over a surfboard modem from Cox > cable. I have an ethernet card (D-link) that I just picked up, and a > crossover cable that connects the two computers via this card, to > another, identical one on the linux box. so just to make sure I am clear, [world]<--->[cable gateway]<--->[fbsd box]<--->[hub]<--->[linux box] that look right? > Here's the results of ifconfig (I can't make heads or tails of it- > which one is my incoming internet connection? ): > This would be your firewire: > fwe0: flags=3D108802 mtu 1500 > options=3D8 > ether 02:e0:18:11:a5:2b > ch 1 dma -1 This is a network card: > bfe0: flags=3D8843 mtu 1500 > options=3D8 > inet6 fe80::2e0:18ff:fef9:96e9%bfe0 prefixlen 64 scopeid 0x2 > inet 68.230.154.245 netmask 0xfffffe00 broadcast 68.230.155.255 > ether 00:e0:18:f9:96:e9 > media: Ethernet autoselect (100baseTX ) > status: active This is a network card: > rl0: flags=3D8802 mtu 1500 > options=3D8 > ether 00:11:95:1d:43:fd > media: Ethernet autoselect (10baseT/UTP) > status: no carrier This would be the lpt port: > plip0: flags=3D108810 mtu 1500 This is the loopback interface: > lo0: flags=3D8049 mtu 16384 > inet 127.0.0.1 netmask 0xff000000 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 > You will need to know the ip address of the cable modem or if it is using=20 dhcp. Use the http admin for the modem to see what the ip is unless you=20 already know. Also note if dhcp is running on the modem, if you want to use= =20 dhcp then read this page (i don't know dhcp setup very well):=20 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-dhcp.html= =20 and ignore the rest of this. Or you can disable dhcp for the LAN and setup = a=20 static network. Static setup: # ifconfig rl0 down # ifconfig bfe0 down # route flush This will clean up your "mess" :-) Next, you need to know the public interface (going to the cable gateway) an= d=20 the private interface (going to your LAN). Now to find the public interface: (assuming the ip address for the cable mo= dem=20 is 192.168.0.1 and has a netmask of 255.255.255.0): # ifconfig rl0 192.168.0.2 netmask 255.255.255.0 # ifconfig rl0 up # route add default gateway 192.168.0.1 # ping 192.168.0.1 You should get a ping response from the cable modem at this point.=20 If not then: # ifconfig rl0 down # route flush # ifconfig bfe0 192.168.0.2 netmask 255.255.255.0 # ifconfig bfe0 up # route add default gateway 192.168.0.1 # ping 192.168.0.1 Make a note of the which interface is which. For the examples I am assuming= =20 rl0 is connected to the cable modem, that is is up, you can ping the modem= =20 and that bfe0 is connected to the LAN. So this will all be set up on reboot: Edit /etc/rc.conf and add: firewall_enable=3D"YES" firewall_type=3D"OPEN" natd_enable=3D"YES" natd_interface=3D"rl0" ifconfig_rl0=3D"inet 192.168.0.1 netmask 255.255.255.0"=20 ifconfig_bfe0=3D"inet 10.0.0.1 netmask 255.255.255.0" gateway_enable=3D"YES" Edit /etc/rc.firewall and edit the "open" section: =46ROM: # Prototype setups. # case ${firewall_type} in [Oo][Pp][Ee][Nn]) setup_loopback ${fwcmd} add 65000 pass all from any to any ;; TO: # Prototype setups. # case ${firewall_type} in [Oo][Pp][Ee][Nn]) setup_loopback ${fwcmd} add divert natd all from any to any via rl0 ${fwcmd} add 65000 pass all from any to any ;; Now Reboot. On the linux box: ifconfig eth0 10.0.0.2 netmask 255.255.255.0 ifconfig eth0 up route add default gateway 10.0.0.1 Now, from the freebsd box: ping 192.168.0.1 ping 10.0.0.2 ping freebsd.org =46rom the linux box: ping 10.0.0.1 ping freebsd.org You should be up and running.=20 You will still need to edit your firewall rules. The "open" setup is just s= o=20 misformed rules aren't a possable problem in the trouble shoot. I'm sure yo= u=20 will be able to google for how to do this. Let me know if this helped or if you have any more questions. =2D James