From owner-freebsd-questions@FreeBSD.ORG Tue Feb 15 13:27:33 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 2AC1316A4CE for ; Tue, 15 Feb 2005 13:27:33 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 0EAE643D54 for ; Tue, 15 Feb 2005 13:27:32 +0000 (GMT) (envelope-from emanuel.strobl@gmx.net) Received: (qmail invoked by alias); 15 Feb 2005 13:27:31 -0000 Received: from flb.schmalzbauer.de (EHLO cale.flintsbach.schmalzbauer.de) (62.245.232.135) by mail.gmx.net (mp017) with SMTP; 15 Feb 2005 14:27:31 +0100 X-Authenticated: #301138 From: Emanuel Strobl To: freebsd-questions@freebsd.org, dgw@liwest.at Date: Tue, 15 Feb 2005 14:27:20 +0100 User-Agent: KMail/1.7.2 References: <200502112206.43267.dgw@liwest.at> <420D2348.4020408@spintech.ro> <200502121505.20754.dgw@liwest.at> In-Reply-To: <200502121505.20754.dgw@liwest.at> X-Birthday: 10/06/72 X-CelPhone: +49 173 9967781 X-Tel: +49 89 18947781 X-Country: Germany X-Address: Munich, 80686 X-OS: FreeBSD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3785422.S4pZehzKVg"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502151427.25443@harrymail> X-Y-GMX-Trusted: 0 cc: Alin-Adrian Anton cc: questions@freebsd.org Subject: Re: How do I set the source address on a multi-homed host? 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: Tue, 15 Feb 2005 13:27:33 -0000 --nextPart3785422.S4pZehzKVg Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Am Samstag, 12. Februar 2005 16:05 schrieb Daniela: > On Friday 11 February 2005 21:27, Alin-Adrian Anton wrote: > > Daniela wrote: > > > I have two NICs (one inside and one outside interface) with NAT > > > activated. The problem is that every time I establish a connection with > > > a machine on my LAN, it uses the address of the outside interface as > > > the source of the packets, which creates problems with my firewall. How > > > do I tell my machine to use the other address whenever I connect to a > > > local machine? > > > > > > Daniela > > > > Hi Daniela, > > > > Can you please be more specific? You mean this happens when you are > > connecting from inside intranet to some other point inside intranet? > > Yes, this happens when I connect from my machine (which functions as a > router with NAT to allow the other LAN machines connect to the internet) to > another LAN machine. When the router establishes a connection to another > point in the intranet, the source address used is my official IP, and not > 10.0.0.1, which is the intranet IP of the router. > In other words, I want the source address to be 10.0.0.1 on every outgoing > connection where the destination is inside my intranet. It's easy if your doing NAT with PF or IPF, something like: nat pass on $o_if from $localnet to !$otherlocal_net -> $oif_addr is what you want. -Harry > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" --nextPart3785422.S4pZehzKVg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCEfi9Bylq0S4AzzwRAn2OAJkBD93yeiVDsl1ZiaZwRTl+BrXHdQCfeO4r 5ZysMswsFZV+N/cna7lta9c= =JckO -----END PGP SIGNATURE----- --nextPart3785422.S4pZehzKVg--