From owner-freebsd-questions@FreeBSD.ORG Wed Mar 9 18:10:05 2005 Return-Path: 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 DC8FB16A4CE for ; Wed, 9 Mar 2005 18:10:05 +0000 (GMT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EEE143D49 for ; Wed, 9 Mar 2005 18:10:05 +0000 (GMT) (envelope-from mag@hamletinc.com) Received: from [192.168.12.99] (c-24-19-27-240.client.comcast.net[24.19.27.240]) by comcast.net (rwcrmhc13) with ESMTP id <200503091810050150046vije>; Wed, 9 Mar 2005 18:10:05 +0000 Message-ID: <422F3B6E.2080205@hamletinc.com> Date: Wed, 09 Mar 2005 10:07:42 -0800 From: "Mark A. Garcia" User-Agent: Mozilla Thunderbird 0.6 (X11/20040519) X-Accept-Language: en-us, en MIME-Version: 1.0 To: patrick References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: IP aliases and forcing outbound IP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 18:10:06 -0000 patrick wrote: >I have a FreeBSD 4.11 box whose ethernet card has several IP address. > > inet 10.0.1.254 netmask 0xffffff00 broadcast 10.0.1.255 > inet 10.0.1.111 netmask 0xffffffff broadcast 10.0.1.111 > >Is there a way I can cause outbound connections to certain hosts to be >from 10.0.1.111 instead of the default 10.0.1.254? I used to be able >to do this fairly easy in Linux because each alias is actually a >separate ethernet device (eg. eth0:0, eth0:1, etc.), but I haven't >figured out how to do this in FreeBSD. > You can try ipnat and set rules to rewrite your source address when attempting to contact specific hosts remotely. -.mag