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