From owner-freebsd-net@FreeBSD.ORG Mon Jul 24 09:41:34 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5883916A4DE for ; Mon, 24 Jul 2006 09:41:34 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from matrix.teledomenet.gr (dns1.teledomenet.gr [213.142.128.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6D0743D4C for ; Mon, 24 Jul 2006 09:41:32 +0000 (GMT) (envelope-from nvass@teledomenet.gr) Received: from iris ([192.168.1.71]) by matrix.teledomenet.gr (8.12.10/8.12.10) with ESMTP id k6O9fUEY003535 for ; Mon, 24 Jul 2006 12:41:30 +0300 From: Nikos Vassiliadis To: freebsd-net@freebsd.org Date: Mon, 24 Jul 2006 12:38:56 +0300 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607241238.57205.nvass@teledomenet.gr> Subject: using loopback address as primary address X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 09:41:34 -0000 Hello everybody, Suppose I have two addresses routed to my box over a PPP interface. I have created on Host_2 a loopback interface and assigned to it Inet_addr_2. Host_1 routes to Host_2 Inet_Addr_2 and everything works if something is coming from internet to Inet_Addr_2. Host_2 has as default router rfc1918_Addr_1 and of course it uses its fxp0 address for outgoing packets. Can I somehow use lo1 address for connections initiated from Host_2? Or is there any other way of doing such a thing? Or nat is the thing to do? Router | | internet | ng0 Inet_Addr_1 Host_1 fxp0 rfc1918_Addr_1 | | rfc1918 network | fxp0 rfc1918_Addr_2 Host_2 lo1 Inet_Addr_2 Another possible sollution would be a tunnel, but I am looking for something more simple. Thanks in advance for your ideas, Nikos