From owner-freebsd-questions@FreeBSD.ORG Thu Jun 17 20:56:24 2010 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 570071065677 for ; Thu, 17 Jun 2010 20:56:24 +0000 (UTC) (envelope-from valerian_ro@yahoo.com) Received: from web30701.mail.mud.yahoo.com (web30701.mail.mud.yahoo.com [68.142.200.134]) by mx1.freebsd.org (Postfix) with SMTP id 1285C8FC13 for ; Thu, 17 Jun 2010 20:56:23 +0000 (UTC) Received: (qmail 62165 invoked by uid 60001); 17 Jun 2010 20:56:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1276808183; bh=jx5i9jVyw3+GzMXWZ8a3pSGM2M52kuwEHVmQ2XCL36A=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=189IVijb+V3n0lTTTVDzJ+VA0g18AQYKE/pYcIDmmxU7ZatOhPzg/4IVJsw2eYYvq+zKSGG34mL6rpLieaMmNSkPcQYvIvhfq00fqHMIb0acdnS4bWoz+Ft1Mv5luyRgqEAJm6k08DfLZJYD1dTbIRcQ87j5XSDm+6nmJqs/BuM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=5mte4PPpFsS5y+sBcbSkIxERlGGd+k6+eWCumsezIpdqYkBcqDJMDjqcI3zl8yNPgnH/YyQsQyjRN+AaQf5Kq5lwopk1qoWBCT4Ly0GtPF0qltO5OCMMNqSaWK70GlIzPaX45D/vy6IOe+o5SZLrSexyLMWZ6Nh57WCu+9lueHA=; Message-ID: <377948.61150.qm@web30701.mail.mud.yahoo.com> X-YMail-OSG: npuPd9IVM1ltGR2t1keFRFA3d_9LkYhORSkS3v5zQ6tuZ.A XuX4IBJSNnum3Zi3LRHNEw1SlbfZxu_8Kj6_hc.hpZNuo.b4eTFRj0S4jLug j7M_xTUDGXNcVWx6Z7jVoaxZqttWUZeItxdqcRc_CRltQhU8NO8a5fnT.AjX 6qGRjqqBqm6rfkkeQFuRdGWYyJ4xvN0iPVG6yGoSE3JjWvEKubQaVdiK.2_S iYH61xu_v1CthJtB2rn2tGp6fnEI1EioDLKxVlEEjxhdm4XrsskRRCo3Yxzs DaoVZNPpKxxOK8v1TmCiUqmX4y7XR57zMI1YBCADgQFbzarAfvVXvlGAwnMi A7Q-- Received: from [89.40.222.110] by web30701.mail.mud.yahoo.com via HTTP; Thu, 17 Jun 2010 13:56:23 PDT X-Mailer: YahooMailClassic/11.1.4 YahooMailWebService/0.8.103.269680 Date: Thu, 17 Jun 2010 13:56:23 -0700 (PDT) From: Valerian Galeru To: freebsd-questions@freebsd.org In-Reply-To: <4C1A89D9.6040104@bah.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: FreeBSD router (IPFW-based): how to block an URL (all IPs of an A-like HOSTNAME) 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: Thu, 17 Jun 2010 20:56:24 -0000 Ok, very simple put: To do this without shell scripting, but this could avoid filter future IP addresses: 1. DIG HOSTNAMEs and add ipfw block rules for those IPs 2. DIG HOSTNAMEs and add a null rule To block all *.hostname and future IP addresses of any of *.hostname, there must be written a shell script, that analyzes all requests [have no idea how to execute a shell script LIVE!!!, any idea on this topic?]. --- On Thu, 6/17/10, Bernt Hansson wrote: From: Bernt Hansson Subject: Re: FreeBSD router (IPFW-based): how to block an URL (all IPs of an A-like HOSTNAME) To: "Valerian Galeru" Cc: freebsd-questions@freebsd.org Date: Thursday, June 17, 2010, 11:47 PM Valerian Galeru said the following on 2010-06-17 22:01: > Hello, > > Does anyone have any ideas how to block all requests using an IPFW-based router > (FreeBSD 6.4) to and from a HOSTNAME (which has more DNS A entries) or better, from any *.HOSTNAME.COM ???? Do a whois hostname.com taking note of their ip-address range. Then, for ipf, put this in your rules file. ### EXAMPLE ### block in quick on fxp0 from 192.168.0.0/16 to any block out quick on fxp0 from any to 192.168.0.0/16