From owner-freebsd-questions@FreeBSD.ORG Sun Nov 29 10:56:30 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47E6D106568F for ; Sun, 29 Nov 2009 10:56:30 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id AE9168FC1E for ; Sun, 29 Nov 2009 10:56:29 +0000 (UTC) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id nATAuIRf093587; Sun, 29 Nov 2009 10:56:24 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk nATAuIRf093587 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1259492184; bh=uLVCGOZyQLWybAaN1uro7C09GteW0o218/vP4kb1pbg=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4B12534B.4090809@infracaninophile.co.uk>|Date:=20S un,=2029=20Nov=202009=2010:56:11=20+0000|From:=20Matthew=20Seaman= 20|Organization:=20Infracaninophi le|User-Agent:=20Thunderbird=202.0.0.23=20(X11/20091129)|MIME-Vers ion:=201.0|To:=20John=20|CC:=20freebsd-q uestions=20|Subject:=20Re:=20slight ly=20complex=20query=20-=20one=20machine=20with=20two=20network=20 interfaces|References:=20<20091129101652.GB48553@potato>|In-Reply- To:=20<20091129101652.GB48553@potato>|X-Enigmail-Version:=200.95.6 |Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha256=3B=0D=0 A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20boundary=3D" ------------enig0B25F43CDE378DA83F8AEC0C"; b=u59Fy8imFzHE1/zu0h/2G5dzwWsJ9yWGXI416XUxIccvX5FiJkHPembmoy7iTq45z boXyM/LLnCtdVqjqOFzr0lu1TmEZaa7iKM324wChlSqmyCCaSQi604f79K2hX9BjKK 9i3dD63OEXS7m9ZiDGrzjD2oIYnINpf1KQXc/p6A= X-Authentication-Warning: happy-idiot-talk.infracaninophile.co.uk: Host localhost [IPv6:::1] claimed to be happy-idiot-talk.infracaninophile.co.uk Message-ID: <4B12534B.4090809@infracaninophile.co.uk> Date: Sun, 29 Nov 2009 10:56:11 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.23 (X11/20091129) MIME-Version: 1.0 To: John References: <20091129101652.GB48553@potato> In-Reply-To: <20091129101652.GB48553@potato> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig0B25F43CDE378DA83F8AEC0C" X-Virus-Scanned: clamav-milter 0.95.3 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions Subject: Re: slightly complex query - one machine with two network interfaces X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 10:56:30 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0B25F43CDE378DA83F8AEC0C Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable John wrote: > Hello list, I hope you can help. >=20 > I have a freebsd 8.0-R machine with a wired and a wireless interface. > The wired network has real IP addresses. I want the wireless to talk to= > the wireless network which is behind a NAT/firewall.=20 >=20 > The wireless interface on the freebsd box does not want to route > traffic (although it would be nice if it could function as a repeater i= f > a wireless laptop was in the vicinity closer to it than the actual > access point, but that's another matter). All I want the wireless > interface on the freebsd box to do right at this moment is to talk to > the other wireless devices. The network is 192.168.0.0/24 >=20 > Now, if I bring both interfaces up on the freebsd box, routing on that > box turns horrible. but the routing table looks normal with 0.0.0.0 > traffic going out on the wired re0 interface. I can ping the wireless > interface from another computer on the private network, but that's abou= t > it. Can anyone give me pointers on how to make the wireless interface > more usable? basically, I want to export via either nfs or samba some > shares to the wireless network, but routing ropiness seems to kill this= =2E Hmmm... this isn't a particularly complex setup really. By bringing up your wireless i/f and assigning it an IP and netmask, you should create a route to the directly attached network (192.168.0.0/24)=20 automatically. Given that, you should certainly have the capability to=20 ping other hosts on that network, and they should be able to ping you. If there isn't an entry for 192.168.0.0/24 in the output of=20 % netstat -rn (note: it may be printed as 192.168.0/24) then try something like this: # route add -net 182.168.0.0/24 -interface wlan0 wlan0 should be the correct interface on 8.0-R but other OS versions will= probably need to substitute the particular device matching their hardware= =2E If that doesn't work, then please show us some real data: the output from= # ifconfig -a # netstat -rn plus any /etc/rc.conf settings relating to ifconfig or wlan. Once you've got the basic networking going, it's downhill from there. Yo= u'll need to provide some sort of means of doing name resolution for the wirel= ess=20 network (minimally this means adding entries to /etc/hosts, but it could = require fiddling with /etc/resolv.conf or other possibilities). You need to be c= areful that the source address of packets you send into the wireless lan is the = IP number on your wlan interface otherwise hosts on the wlan will send their replie= s out through the NAT gateway (their default route) instead of straight back to= you. By and large this will just work automatically -- there are some software= packages where you can override the normal behaviour, but presumably you should kn= ow if you've set up anything like that. If you suspect this is a problem, use = tcpdump or=20 wireshark to capture and examine the traffic passing across your wlan int= erface. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig0B25F43CDE378DA83F8AEC0C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAksSU1IACgkQ8Mjk52CukIyfVwCeLxq+mY9RgtQM+YsHdFkWkX2o jpoAn2h7QcKnPnwYevu5r1fhjh/lUtB8 =guMm -----END PGP SIGNATURE----- --------------enig0B25F43CDE378DA83F8AEC0C--