From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E33EA1381F3 for ; Wed, 22 May 2013 18:52:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB151E080B; Wed, 22 May 2013 18:52:24 +0000 (UTC) Received: from mail2.viabit.com (mail2.viabit.com [65.246.80.16]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6FDD0E07D7 for ; Wed, 22 May 2013 18:52:23 +0000 (UTC) Received: from [10.1.1.204] (unknown [65.213.236.244]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail2.viabit.com (Postfix) with ESMTPSA id 3bG2yY0188z1hfG for ; Wed, 22 May 2013 14:52:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=orlitzky.com; s=mail2; t=1369248741; bh=GgRV4dfRn6GZbIvrsSz0uaBTl+4v7K0L/hD+x4+UJlI=; h=Date:From:To:Subject:References:In-Reply-To; b=yUzXQI9cg+sFOnAQxvN8k16MoKt82KVbxAnRMB+k/BrhbbnY6anD2ShjQsoxitsJT nrjE7nZP2zH4KP43Ll0ou7Eor+oOx6M/Y80T8G7lyt2aWvvgZXquBBPmpuYBmtHTtq 9816aVGGMh6oA7fOxY2pF8oP8WoJTeuhW9KOinHg= Message-ID: <519D13E4.1070700@orlitzky.com> Date: Wed, 22 May 2013 14:52:20 -0400 From: Michael Orlitzky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130417 Thunderbird/17.0.5 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] VPN vs LAN address hostname resolution References: <519CF41B.5040108@gmail.com> <519D021D.2050006@orlitzky.com> <519D05C9.8000308@gmail.com> <519D0ED4.80304@gmail.com> In-Reply-To: <519D0ED4.80304@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 610a8a47-bb23-4fa3-9fe4-ed4cf258f371 X-Archives-Hash: 03df938a92ea3e9779c11240aab5f958 On 05/22/13 14:30, Samuraiii wrote: > I'm sorry for mistake the subnet mask for both spaces IS 255.255.255.0. > so it is not overlapping at all. > I apologise for my mistake in notation. > still this is not (mainly) problem with routing but problem with > assigning name to address. > If I had superfast internet connection I would not mind and just use vpn > address space. > So basically i need to assign lan address to computer (laptop) which is > in same location (LAN) as other machines. And vpn address on all other > computers. > > to illustrate: > > hostname: foo > Location:1 > address eth0: 10.1.1.3 > address tap0: 10.2.2.3 > > hotname: bar > Location: 1 > addresses are irrelevant > hosts entry for foo is 10.1.1.3 *(this is what I want to update if foo > moves to location 2 to 10.2.2.3)* > > hosname baz > Location: 2 > addresses are irrelevant > Hosts entry for foo is 10.2.2.3 *(this is what I want to update if foo > moves to location 2 to 10.1.1.3)* > Which machines are joined to the VPN? For a location-to-location VPN, the simplest thing to do would be to have your gateway routers participate in the VPN and handle the routing appropriately. That way if you're on the LAN at location 1 and you send a packet to another machine on the same LAN (using its VPN address), the gateway router knows to send the packet right back onto the LAN. No configuration necessary on the hosts. You can use the same VPN addresses at both locations. If that's not possible, set up a DNS resolver at each location and return the appropriate (local or VPN) address.