Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Nov 2001 17:52:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Nov 2001 17:52:04 -0500 Received: from waste.org ([209.173.204.2]:31898 "EHLO waste.org") by vger.kernel.org with ESMTP id ; Tue, 27 Nov 2001 17:51:56 -0500 Date: Tue, 27 Nov 2001 16:51:50 -0600 (CST) From: Oliver Xymoron To: Peter Svensson cc: Bill Davidsen , Linux Kernel Mailing List Subject: Re: Default outgoing IP address? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Nov 2001, Peter Svensson wrote: > On Tue, 27 Nov 2001, Oliver Xymoron wrote: > > > I have a host which has canonical address foo, which also happens to be a > > gateway. Foo happens to be on the local side of the gateway, so when > > initiating connections, they appear to be from the gateway interface > > address, bar. This is inconvenient because bar is an address on a network > > I don't have DNS authority over, etc., so it'd be nice if outgoing > > connections by default would appear to come from foo. > > This should do the trick, or something similar. It changes the default > route to prefer another source address if none is set through a bind(2) > call. > > ip route chg default via $DEF_GW dev $OUTSIDE_DEV src $MY_CANOICAL_SRC > > A variation of this (for a slightly different purpose) is used by me. Figured that out myself about 10 minutes ago. Thanks. -- "Love the dolphins," she advised him. "Write by W.A.S.T.E.." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/