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 10F831381F3 for ; Wed, 22 May 2013 18:30:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F1E2FE080C; Wed, 22 May 2013 18:30:49 +0000 (UTC) Received: from we1-f189.wedos.net (we1-f189.wedos.net [46.28.105.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8B693E07FB for ; Wed, 22 May 2013 18:30:48 +0000 (UTC) Received: from ([94.113.166.116]) by we1-f189.wedos.net (WEDOS Mail Server mail1) with ASMTP (SSL) id HBA00045; Wed, 22 May 2013 20:30:45 +0200 Message-ID: <519D0ED4.80304@gmail.com> Date: Wed, 22 May 2013 20:30:44 +0200 From: Samuraiii User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130515 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> In-Reply-To: <519D05C9.8000308@gmail.com> X-Enigmail-Version: 1.6a1pre OpenPGP: id=80C752EA X-TagToolbar-Keys: D20130522203044508 Content-Type: multipart/alternative; boundary="------------020604060702060700090009" X-Archives-Salt: c2846f77-2201-4562-a4c3-ee85829ecab6 X-Archives-Hash: 26974a272dcf26951dfb62778a88b598 This is a multi-part message in MIME format. --------------020604060702060700090009 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2013-05-22 19:52, Michael Mol wrote: > On 05/22/2013 01:36 PM, Michael Orlitzky wrote: >> On 05/22/13 12:36, Samuraiii wrote: >>> Hello, >>> >>> I am trying to get hostname address resolution on my LAN and VPN with= >>> one serious problem: >>> I have two "networks" eg. 10.1.1.0 and 10.2.2.0 which are representin= g >>> local address space for LAN (10.1.1.0/8) and VPN address space (10.2.= 2.0/8). >> This isn't two networks, it's one network and you've got the VPN space= >> overlapping the LAN space. To oversimplify a little, Don't Do That. >> >> Use a separate subnet for the VPN. Then traffic to the VPN will be >> routed over the VPN interface as intended, but traffic to the LAN will= >> be routed over the LAN interface. This is what you want, but right now= >> the VPN and the LAN are the same network, so "routing to the LAN" is t= he >> same as "routing to the VPN", and your network stack doesn't know what= >> to do with it. >> >> > To be clear, replacing /8 with /24 would do this: > > 10.1.1.0/8, as a "network", is really just 10.0.0.0/8. This is also tru= e > of 10.2.2.0/8. The bits after the first 8 are irrelevant, since a /8 is= > being used. Use /24 instead, in this case. > > It would be good for Samuraiii to read up: > > http://www.tcpipguide.com/free/t_IPAddressing.htm > > 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)* Thank you or patience S --------------020604060702060700090009 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 2013-05-22 19:52, Michael Mol wrote:
On 05/22/2013 01:36 PM, Michael Orlitzky wrote:
On 05/22/13 12:36, Samuraiii wrote:
Hello,

I am trying to get hostname address resolution on my LAN and VPN with
one serious problem:
I have two "networks" eg. 10.1.1.0 and 10.2.2.0 which are representing
local address space for LAN (10.1.1.0/8) and VPN address space (10.2.2.0/8).
This isn't two networks, it's one network and you've got the VPN space
overlapping the LAN space. To oversimplify a little, Don't Do That.

Use a separate subnet for the VPN. Then traffic to the VPN will be
routed over the VPN interface as intended, but traffic to the LAN will
be routed over the LAN interface. This is what you want, but right now
the VPN and the LAN are the same network, so "routing to the LAN" is the
same as "routing to the VPN", and your network stack doesn't know what
to do with it.


To be clear, replacing /8 with /24 would do this:

10.1.1.0/8, as a "network", is really just 10.0.0.0/8. This is also true
of 10.2.2.0/8. The bits after the first 8 are irrelevant, since a /8 is
being used. Use /24 instead, in this case.

It would be good for Samuraiii to read up:

http://www.tcpipguide.com/free/t_IPAddressing.htm


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)*

Thank you or patience
S


--------------020604060702060700090009--