Gentoo Archives: gentoo-user

From: Samuraiii <samurai.no.dojo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] VPN vs LAN address hostname resolution
Date: Wed, 22 May 2013 18:30:59
Message-Id: 519D0ED4.80304@gmail.com
In Reply to: Re: [gentoo-user] VPN vs LAN address hostname resolution by Michael Mol
1 On 2013-05-22 19:52, Michael Mol wrote:
2 > On 05/22/2013 01:36 PM, Michael Orlitzky wrote:
3 >> On 05/22/13 12:36, Samuraiii wrote:
4 >>> Hello,
5 >>>
6 >>> I am trying to get hostname address resolution on my LAN and VPN with
7 >>> one serious problem:
8 >>> I have two "networks" eg. 10.1.1.0 and 10.2.2.0 which are representing
9 >>> local address space for LAN (10.1.1.0/8) and VPN address space (10.2.2.0/8).
10 >> This isn't two networks, it's one network and you've got the VPN space
11 >> overlapping the LAN space. To oversimplify a little, Don't Do That.
12 >>
13 >> Use a separate subnet for the VPN. Then traffic to the VPN will be
14 >> routed over the VPN interface as intended, but traffic to the LAN will
15 >> be routed over the LAN interface. This is what you want, but right now
16 >> the VPN and the LAN are the same network, so "routing to the LAN" is the
17 >> same as "routing to the VPN", and your network stack doesn't know what
18 >> to do with it.
19 >>
20 >>
21 > To be clear, replacing /8 with /24 would do this:
22 >
23 > 10.1.1.0/8, as a "network", is really just 10.0.0.0/8. This is also true
24 > of 10.2.2.0/8. The bits after the first 8 are irrelevant, since a /8 is
25 > being used. Use /24 instead, in this case.
26 >
27 > It would be good for Samuraiii to read up:
28 >
29 > http://www.tcpipguide.com/free/t_IPAddressing.htm
30 >
31 >
32 I'm sorry for mistake the subnet mask for both spaces IS 255.255.255.0.
33 so it is not overlapping at all.
34 I apologise for my mistake in notation.
35 still this is not (mainly) problem with routing but problem with
36 assigning name to address.
37 If I had superfast internet connection I would not mind and just use vpn
38 address space.
39 So basically i need to assign lan address to computer (laptop) which is
40 in same location (LAN) as other machines. And vpn address on all other
41 computers.
42
43 to illustrate:
44
45 hostname: foo
46 Location:1
47 address eth0: 10.1.1.3
48 address tap0: 10.2.2.3
49
50 hotname: bar
51 Location: 1
52 addresses are irrelevant
53 hosts entry for foo is 10.1.1.3 *(this is what I want to update if foo
54 moves to location 2 to 10.2.2.3)*
55
56 hosname baz
57 Location: 2
58 addresses are irrelevant
59 Hosts entry for foo is 10.2.2.3 *(this is what I want to update if foo
60 moves to location 2 to 10.1.1.3)*
61
62 Thank you or patience
63 S

Replies

Subject Author
Re: [gentoo-user] VPN vs LAN address hostname resolution Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] VPN vs LAN address hostname resolution Michael Orlitzky <michael@××××××××.com>