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 19:35:44
Message-Id: 519D1E02.1080001@gmail.com
In Reply to: Re: [gentoo-user] VPN vs LAN address hostname resolution by Michael Orlitzky
1 On 2013-05-22 20:52, Michael Orlitzky wrote:
2 > On 05/22/13 14:30, Samuraiii wrote:
3 >> I'm sorry for mistake the subnet mask for both spaces IS 255.255.255.0.
4 >> so it is not overlapping at all.
5 >> I apologise for my mistake in notation.
6 >> still this is not (mainly) problem with routing but problem with
7 >> assigning name to address.
8 >> If I had superfast internet connection I would not mind and just use vpn
9 >> address space.
10 >> So basically i need to assign lan address to computer (laptop) which is
11 >> in same location (LAN) as other machines. And vpn address on all other
12 >> computers.
13 >>
14 >> to illustrate:
15 >>
16 >> hostname: foo
17 >> Location:1
18 >> address eth0: 10.1.1.3
19 >> address tap0: 10.2.2.3
20 >>
21 >> hotname: bar
22 >> Location: 1
23 >> addresses are irrelevant
24 >> hosts entry for foo is 10.1.1.3 *(this is what I want to update if foo
25 >> moves to location 2 to 10.2.2.3)*
26 >>
27 >> hosname baz
28 >> Location: 2
29 >> addresses are irrelevant
30 >> Hosts entry for foo is 10.2.2.3 *(this is what I want to update if foo
31 >> moves to location 2 to 10.1.1.3)*
32 >>
33 > Which machines are joined to the VPN? For a location-to-location VPN,
34 > the simplest thing to do would be to have your gateway routers
35 > participate in the VPN and handle the routing appropriately. That way if
36 > you're on the LAN at location 1 and you send a packet to another machine
37 > on the same LAN (using its VPN address), the gateway router knows to
38 > send the packet right back onto the LAN. No configuration necessary on
39 > the hosts. You can use the same VPN addresses at both locations.
40 >
41 > If that's not possible, set up a DNS resolver at each location and
42 > return the appropriate (local or VPN) address.
43 >
44 >
45 The only result I got was a script which every 5 minutes checked all
46 possible addresses of given machine (my "network" is not big at all -
47 only eight machines and one network printer). So checking around 20
48 addreses is not big deal - but this approach feels clumsy and not
49 scalable to bigger networks (as have other users from list to deal with).
50
51 Script was just checking (by sftp with public ssh keys for unprivileged
52 account) if LAN (eth or wifi) address is up and if not it just assigned
53 address to hostname from vpn range (it did not accounted if machine is
54 up or down). And the just write new /etc/hosts.
55 Central dns is possible only in one part of network - only one machine
56 runs 24/7.
57 For me personally is not problem to remember where am I - but other
58 users need names instead of adresses.
59
60 Routers on both sides are just simple boxes which support only built-in
61 dhcp.
62 Central DNS and/or routed VPN does not solve problem of compute not in
63 any of "known" networks.
64
65 S

Replies

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