1 |
On Sunday 21 September 2008 18:47:24 Robert Bridge wrote: |
2 |
> On Sun, 21 Sep 2008 15:08:18 +0200 |
3 |
> |
4 |
> Momesso Andrea <momesso.andrea@×××××.com> wrote: |
5 |
> > My home server is 192.168.1.5 in my home wan, the hostname of the |
6 |
> > machine is "fandango", and the the /etc/hosts in my laptop looks like |
7 |
> > this: |
8 |
> > |
9 |
> > [...] |
10 |
> > 192.168.1.5 fandango |
11 |
> > |
12 |
> > Sometimes I need to connect to the server while I'm far from home, so |
13 |
> > the server has also a dyndns address, let's say "fandango.dyndns.org". |
14 |
> > |
15 |
> > When I connect from outside my wan I use "fandango.dyndns.org", when |
16 |
> > I'm at home just "fandango". |
17 |
> > |
18 |
> > Is there a way to tell my laptop to always use "fandango" and, |
19 |
> > if "192.168.1.5" is available, to resolve it this way, otherwise to |
20 |
> > resolve it as "fandango.dyndns.org". |
21 |
> > |
22 |
> > This way I will avoid double configurations, double password stored |
23 |
> > in firefox, ecc... |
24 |
> > |
25 |
> > Any ideas? |
26 |
> |
27 |
> Well, when I used to switch my laptop between college (college didn't |
28 |
> use DHCP!) and home networks, I was reduced to a script to switch |
29 |
> configs for eth0... |
30 |
> |
31 |
> It sounds like all you need to do is swap out the hosts file depending |
32 |
> on which network you are on, this shouldn't be difficult... |
33 |
> |
34 |
> Rob. |
35 |
|
36 |
Like having a /etc/hosts.home and a /etc/hosts.world and a script that |
37 |
sysmlinks them to /etc/hosts depending on the fact that i can ping or not |
38 |
192.168.1.5? |
39 |
|
40 |
-- |
41 |
======================================== |
42 |
MOMESSO ANDREA |
43 |
339 4192788 |
44 |
======================================== |