From owner-freebsd-questions@FreeBSD.ORG Fri Nov 11 17:36:03 2005 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 1874116A41F for ; Fri, 11 Nov 2005 17:36:03 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id B007943D45 for ; Fri, 11 Nov 2005 17:36:02 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 26FDF5CE7; Fri, 11 Nov 2005 12:36:02 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 90256-10; Fri, 11 Nov 2005 12:36:01 -0500 (EST) Received: from [199.103.21.238] (pan.codefab.com [199.103.21.238]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 214E55C52; Fri, 11 Nov 2005 12:36:01 -0500 (EST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <12B737A6-96D1-4EA4-98AE-D222D24B3108@mac.com> Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Fri, 11 Nov 2005 12:36:00 -0500 To: Perttu Laine X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: amavisd-new at codefab.com Cc: freebsd-questions@freebsd.org Subject: Re: route how to? 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: Fri, 11 Nov 2005 17:36:03 -0000 On Nov 11, 2005, at 12:15 PM, Perttu Laine wrote: > I'd like to add route to my computer so one ip would be forwarded to > "/dev/null". So all other connections would work normally, but > connection to > for example 192.168.10.1 would not work. How > can this > be done? And I propably need same for IPv6 too. I'd like to this > with route > instead of firewall 'cause this is temporary and kernel of that > computer > don't have pf enabled at the moment. It's better to use a firewall than routing to block traffic, but you want to use one of these flags: -reject RTF_REJECT - emit an ICMP unreachable when matched -blackhole RTF_BLACKHOLE - silently discard pkts (during updates) Something like: route add 192.168.10.1 localhost -reject > Oh. And if I add this route, how can delete it later? route delete 192.168.10.1 -- -Chuck