LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-06-2006, 08:09 AM   #1
aclarke
LQ Newbie
 
Registered: Feb 2006
Location: Embro, ON Canada
Distribution: Ubuntu, Debian
Posts: 20

Rep: Reputation: 0
Accessing local network by its public IP/name


Hi. I have a small network of computers here at home and I'd like to be able to access them by my publicly addressable IP or host name. For instance, I have a Dynamic DNS hostname, let's just say myhouse.dyndns.org . I'd like to be able to use myhouse.dyndns.org as my IMAP server, or http server or whatever, from when I'm at home just like when I'm away from home.

I'm even sure what that's called though which makes it hard to search for a solution! The closest thing I can think of is local loopback but I don't know if that's really what I'm looking for or not. I have a debian linux-based firewall/proxy/DHCP server through which all my traffic goes, so I assume I can set up routing tables or something to take requests for myhouse.dyndns.org or my static IP address and route them back to 127.0.0.1 or something. I just don't know how to do it.

If anyone can point me in the right direction on this, I'd really appreciate it.

Thanks a lot,
- Andrew Clarke.
 
Old 09-06-2006, 09:04 AM   #2
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
Would putting entries in /etc/hosts do the job?
So edit /etc/hosts - you don't say which distro you're using, I would do:
sudo nano /etc/hosts
Then on the line that looks like this:
127.0.0.1 localhost
change it to this
127.0.0.1 localhost myhouse.dyndns.org
and if you have any other computers defined, like
192.168.0.2 laptop
change them to
192.168.0.2 laptop laptop.myhouse.dyndns.org

You don't need to restart anything for this work, it seems the file is often looked at.
You would need to do this for any machine that you want to be able to reference like this.
 
Old 09-06-2006, 09:06 AM   #3
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
And you can do this on windows machines too. The file has the same syntax, just search for hosts, it's somewhere in the Windows System files. It might also be called lmhosts. There is built in help in windows about using this file.
 
Old 09-06-2006, 09:15 AM   #4
aclarke
LQ Newbie
 
Registered: Feb 2006
Location: Embro, ON Canada
Distribution: Ubuntu, Debian
Posts: 20

Original Poster
Rep: Reputation: 0
Hi. Thanks for your responses. /etc/hosts won't work for me for a couple reasons.

First of all, I have a number of machines that do different things. For instance, http://myhouse.dyndns.org may be on one computer here, whereas my IMAP server may be on another computer. So I can't just forward myhouse.dyndns.org to 192.168.1.12 or something, as depending on the port, it could be going to any one of a number of computers.

Secondly, workstation in question is a portable (powerbook). Therefore if I change /etc/hosts I have to change it whenever I leave the house, and then whenever I come back home.

I know the hardware provided by my ISP doesn't support local loopback or else (I think) this would Just Work. Therefore, I need to fake it somehow with custom routing, but I don't know how to do that.

Thanks again,
- Andrew.
 
Old 09-06-2006, 10:14 AM   #5
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Internal DNS is the only way. Now I'm not the one that can help you I just know thats what you need. Check out Bind9
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem accessing anything outside my local network. wbuik Linux - Networking 3 09-21-2005 05:09 PM
Accessing FTP outside of local network with Suse 9.1 Pro HeX Productions Linux - Security 1 11-08-2004 05:53 PM
Is it possible to use eth0 for both local and public network? DrunkGod Linux - Networking 7 03-08-2004 10:01 PM
Accessing a local server with a public IP ganninu Linux - Networking 5 12-29-2003 04:07 AM
Accessing my public ip. CurlyMo Linux - Networking 26 03-10-2003 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration