From owner-freebsd-questions@FreeBSD.ORG Wed Mar 8 13:13:03 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E778416A420 for ; Wed, 8 Mar 2006 13:13:03 +0000 (GMT) (envelope-from carpetsmoker@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5FBA43D46 for ; Wed, 8 Mar 2006 13:13:02 +0000 (GMT) (envelope-from carpetsmoker@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so171374nzo for ; Wed, 08 Mar 2006 05:13:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:to:subject:content-type:mime-version:message-id:user-agent:from; b=iInXAHezkVvhpHdBoqE83Tg+pXn6nxsVky6rQqxlMYpwZ4/IxSu5bquNhd496TqCYqV5ufTNL7F4Q9Cylm45zrONq2GXwtTjQW/pv5Z8YCL5FjckyoTUjnPFhflbuF4OGopy48tXpby16ssLwhpfekf8deiWDdT8BSyFoHeMD7c= Received: by 10.37.22.14 with SMTP id z14mr2042754nzi; Wed, 08 Mar 2006 05:13:01 -0800 (PST) Received: from anyhost.anywhere ( [80.126.94.163]) by mx.gmail.com with ESMTP id 39sm1375777nzk.2006.03.08.05.13.00; Wed, 08 Mar 2006 05:13:01 -0800 (PST) Date: Wed, 08 Mar 2006 14:12:25 -0000 To: freebsd-questions@freebsd.org Content-Type: multipart/mixed; boundary=----------YvCboJyJeV8VGPuvOTohgh MIME-Version: 1.0 Message-ID: User-Agent: Opera M2/8.50 (FreeBSD, build 1358) From: Martin Tournoy Subject: Network bridge with IPFW, can't get it working 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: Wed, 08 Mar 2006 13:13:04 -0000 ------------YvCboJyJeV8VGPuvOTohgh Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii Content-Transfer-Encoding: 8bit Here's the situation: I work at a computer repair shop, as we all know viruses, ad-ware and other mal-ware is a huge problem in the windows world, and a lot of people come to us to have their pc's cleaned up. Some of those programs spread themselves actively, or are used as "zombie computers", which is somewhat of a problem for us because it can infect other PCs on the net, also our ISP (temporarily) shut us down some time ago for security reasons. We have a firewall on our router, but it only blocks incoming traffic from the net, which makes life a bit easyer because we don't have to open up ports for all kind of programs all the time. Since we more or less need internet on infected PC's (to download virus-scanners, updates, etc.), I'm trying to setup a bridge with a firewall (IPFW), which should separate filter any bad traffic before it goes to the internet. Problem is, it doesn't work(which is secure, but not quite what I intended). The bridge works fine, if I shut down IPFW (or tell IPFW to allow everything) I have network access, so no problems there... If I scan for DHCP servers, It finds the server and DNS, but doesn't get an IP-adress (?!) for some reason, no matter what I do... My rc.firewall is attached, I made it as simple as possible, complexity and spiffy features can always be added later, let's get the thing working first... I would really appreciate it if someone looked over it, there are probably errors in there. What the REAL problem is, is that I'm a real novice at firewalls, and some things really confuse me, more specifically: - The 'bridged' keyword, does it HAVE to be added to every rule? or is it just recommended? or just specific rules? - Which ports do I need to open? I think I have all I need now (DHCP, DNS, http, https, ping), maybe there's some hidden port I forgot? - Should I use PF? (Is it easyer for a novice?) - Should I just setup a separate LAN? Bridging seems simpler, but doesn't seem to be very common/well documented... I don't think it matters, but just in case: I'm using two 3Com 3C905B-TX NIC's (xl) My uname -a is: FreeBSD filtershit.ictwerkplaats.org 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Wed Feb 22 12:47:58 UTC 2006 carpetsmoker@.ictwerkplaats.org:/usr/obj/usr/src/sys/FILTERSHIT i387 ------------YvCboJyJeV8VGPuvOTohgh Content-Disposition: attachment; filename=rc.firewall Content-Type: application/octet-stream; name=rc.firewall Content-Transfer-Encoding: Base64 IyEvYmluL3No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