View previous topic :: View next topic |
Author |
Message |
beuselinck n00b

Joined: 09 Oct 2004 Posts: 19 Location: Ghent, Belgium
|
Posted: Mon Feb 07, 2005 8:30 pm Post subject: dynamic dns: reach hosts inside Lan directly |
|
|
Hi everybody,
this is my home setup:
a recycled pc (edge) is my router, firewall,...: it's connected through eth1 with the internet. eth0 is connected via a switch to one desktops and one laptop (shiva and armada: my Lan). On edge, I have dnsmasq runnig which offers me name resolution for my home network.
I got a hostname from dyndns (www.dyndns.org). This hostname is linked with the dynamic ip adres i get from my ISP. let's say it's raksus.homelinux.org.
I'm able to connect to raksus.homelinux.org with ssh.
Now my question: is there an easy way to connect to my desktop pc inside the lan directly. eg with
Code: |
ssh shiva.raksus.homelix.org
|
I know I can setup iptables to do port forwarding. eg I can forward port 22 to shiva. This method would direct all ssh connections to shiva which isnt my intention.
Two more things:
1. dyndns offers the ability to use wildcards in a way that eg www.raksus.homelinux.org also points to raksus.homelinux.org which is in fact edge
2.
Code: |
edge root # cat /etc/hostname
edge
edge root # cat /etc/dnsdomainname
raksus.homelinux.org
|
Thanks for the help! |
|
Back to top |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Feb 07, 2005 8:43 pm Post subject: |
|
|
Just use other ports than 22 for your other PCs, and forward them to port 22 on those systems.
edge: ssh 22
shiva: ssh 2022
armanda: ssh 3022
or whatever.
Or ssh from edge into the other systems; it's dead easy to tunnel ssh traffic. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
 |
beuselinck n00b

Joined: 09 Oct 2004 Posts: 19 Location: Ghent, Belgium
|
Posted: Mon Feb 07, 2005 9:06 pm Post subject: |
|
|
thanks for the reply. Indeed, this should work
If i'm correct this should then be a way to connect to shiva
Code: |
ssh raksus.homelinux.org:3022
|
rigth?
Maybe two more questions, while we're on the subject
1. What's the difference between /etc/domainname, /etc/dnsdomainname and /etc/nisdomainname. I've never found a complete answer to this in any of the forums.
2. A while ago, when I booted any of my computers I got something like: "This is shiva.(none) (Linux....)" Lead by some other threads on this forum I solved this for the computers behind my firewall by adding these lines in my /etc/hosts
Code: |
127.0.0.1 shiva.raksus.homelinux.org shiva localhost
|
Though when I added these linus for my firewall, everytime I connected from let's say shiva to edge I ended logging into localhost. This makes sense because I have dnsmasq running on my firewall which happens to read /etc/hosts for the name resolution. I might solve this by adding
Code: |
domainname raksus.homelinux.org
|
to the local.start script but there must be a more elegant solutions. The /etc/init.d/domainname script should take care of this!
thanks |
|
Back to top |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Feb 07, 2005 9:51 pm Post subject: |
|
|
/etc/domainname - doesn't exist.
/etc/dnsdomainname - DNS domain name
/etc/nisdomainname - NIS domain name
If you enter your domain name in dnsdomainname then it does work. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
 |
|