You are not logged in.

#1 2012-01-03 23:30:54

pokraka
Member
From: Brussels
Registered: 2009-01-15
Posts: 63

local lookup not working : what to do ?

Hello,

I set up an account at dyndns.org so I can ssh to my desktop computer using "ssh mydomain.dyndns.org" on the command line when away from home.
It works except when I'm at home and I try to access the desktop computer from my netbook via the wifi. In this case I just get "connection refused".
It seems local lookup (is it what it's called ?) doesn't work with my router, so when I'm at home I have to use the local IP address : "ssh 192.168.1.128".
But to avoid confusions I would like to be able to use the dyndns domain from home too.

What's the correct way to do this ?
I thought of configuring my wireless network manager so it would execute a script when connecting to my home network and modify the /etc/hosts file so mydomain.dyndns.org points to my local ip address. And then undo the change when disconnecting from the network. But it seems a bit cumbersome to me for such a simple task.

Any advice ?

Thanks.

Offline

#2 2012-01-03 23:48:01

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: local lookup not working : what to do ?

See if your router supports NAT loopback. Otherwise, if the router acts as a DNS server/forwarder/cache, maybe you can add an entry pointing to the local IP.

Offline

#3 2012-01-03 23:53:53

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: local lookup not working : what to do ?

It seems weird that the laptop can't just keep using the same domain name. That is, assuming your netbook does have access to the external internet via the wifi and is correctly resolving external domain names.

Can you confirm that the netbook can ping mydomain.dyndns.org?

Also, you might find the use of host profiles in your netbook's ssh config useful. It won't let you use exactly the same name for different IP addresses, but it will let you use two short names. Eg, I have it set up so I can just run,

ssh home

when I'm away from home, and I can run

ssh hex

when I want to access the same computer over the wlan.

Offline

#4 2012-01-04 00:20:25

pokraka
Member
From: Brussels
Registered: 2009-01-15
Posts: 63

Re: local lookup not working : what to do ?

/dev/zero wrote:

It seems weird that the laptop can't just keep using the same domain name. That is, assuming your netbook does have access to the external internet via the wifi and is correctly resolving external domain names.

Can you confirm that the netbook can ping mydomain.dyndns.org?

Yes the netbook can resolve the domain name. But I tried using the WAN IP from the netbook when at home and it doesn't work either. Only the LAN IP seems to work at home. Ping to mydomain.dyndns.org works, but I can't access any of the servers on my desktop computer using this DNS.

I thought of using ssh profiles but I also have other servers (web, transmission web client) on the desktop computer that I would like to access using mydomain.dyndns.org.

Offline

Board footer

Powered by FluxBB