LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-25-2006, 05:42 AM   #1
gobi_dgm
Member
 
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137

Rep: Reputation: 15
Question Hiding IP address


hi
i hosted some documentation pages in my local machine running apache. They will be seen by our local network users using the address http://<ip_addr>/document

I need to hide the ipaddr in the url given above, instead i can give a name for that. How can i do that? pl share your ideas.. im new to this area..

thanks in advance
gk
 
Old 01-25-2006, 07:31 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
DNS is your friend.
Basically, DNS does exactly what you want. It "translates" hostnames (names of computers) to IP addresses.
rDNS (reverse DNS) handles the opposite translation, but uses the same data as DNS.

If you don't have a DNS server already on your network and you don't want to use a DNS from your ISP because that will cost you too much or because you want the hostnames to work only for your local network, then you
should take a look at:
/etc/hosts
/etc/host.config
/etc/resolv.conf
and their respective man pages (ie man hosts, man host.config, man resolv.conf).
 
Old 01-25-2006, 09:43 AM   #3
handu
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Rep: Reputation: 0
Hostname is just a name for your ip.
If you just don't like those numbers, refer to timmeke's post, for
an easy DNS, router, firewall, DHCP etc. I recomend you the ipcop distro
http://www.ipcop.org
 
Old 01-25-2006, 10:26 AM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by gobi_dgm
i hosted some documentation pages in my local machine running apache. They will be seen by our local network users using the address http://<ip_addr>/document
If by "local network users" you really mean "local MACHINE users" then you don't need DNS. Local machine users, i.e., users on the same computer as the webserver, can access the page at http://localhost/document

If your users are hitting your webserver from different computers, which would be the more expected situation, then you will need to follow timmeke's advice.
 
Old 01-27-2006, 12:03 AM   #5
gobi_dgm
Member
 
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137

Original Poster
Rep: Reputation: 15
As per timmeke's advice i read the man pages but i still doubt how can i register my machine's ip in the local DNS which makes other users in the local network access through name instead of IP. In resolv.conf we specify the name server address which will be queried in case of unknown IP. What if i access my IP from someother machine? should i modify those files in that machine too.. this will be tedious. I dont understand how it works. Can you please explain me?
 
Old 01-27-2006, 01:46 AM   #6
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
How exactly it works, is mostly configurable.
/etc/host.conf explains which mechanisms are used to resolve host names to IP addresses and in which order.
By default, I think, it contains "order hosts,bind", signifying simply that the "hosts" mechanism is tried first and then the "bind" method. The "hosts" method is nothing more than a lookup in the file /etc/hosts. If the IP address and hostname combination is defined there, it is used, no matter what your DNS server has stored. The "bind" method is DNS. It is configured via /etc/resolv.conf. In this configuration files, you can make the "bind" program look for the computer on your domain (via a "search" directive), contact a DNS server to look for answers, contact a backup DNS server if the first one doesn't give the answer or doesn't respond in time to your request. Configuring DNS servers is done via the "nameserver" directive.

As for your network, you mention that you have your own, local, DNS machine. Typically, all other machines should thus have their own /etc/hosts file, that only defines their own host and the "localhost" interface (a special loopback network interface, used by some programs to contact the machine it's running on). "localhost" refers to the machine itself and thus must be configured on each machine separately. Furthermore, each machine should then have a resolv.conf file that tells them the IP address of the local DNS server so that they can do DNS lookups (otherwise, your DNS server isn't queried/used). In the DNS, you need to simply add an "A" record (A is short for Address), which simply contains a hostname-IP address pair. All the machines on your network will find the IP address when they query your host's name on the DNS server. If you don't have access to your DNS server's configuration, please ask your network administrator to do it for you.

For some special kinds of servers, you need -in addition to an A record- also other DNS records, like a MX record for mail servers. But that isn't the case here. I just mention it for completeness.
 
Old 01-27-2006, 02:21 AM   #7
gobi_dgm
Member
 
Registered: Feb 2005
Location: Bangalore
Distribution: FC3
Posts: 137

Original Poster
Rep: Reputation: 15
Thanks for your detailed reply timmeke.. I understand what should i do next.

Thanks
gk
 
Old 01-27-2006, 10:35 AM   #8
sunpascal
Member
 
Registered: Jan 2005
Distribution: Debian
Posts: 104

Rep: Reputation: 15
Hi,
I'm not sure what setup you have, but it seems you want to substitue your ip address for a domain name. Perhaps not excactly what you are looking for (especially if your web site will only be viewed by people in your local network), but maybe still worth looking at http://www.dyndns.com
In linux you need ddclient to get it to work.
sunpascal
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
A partition is hiding... jsheffie SUSE / openSUSE 2 04-25-2005 12:30 PM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
Hiding Ports Ozzman Linux - Security 9 12-08-2003 07:24 PM
how does a brower get URL address info when the website is hiding it? sirpelidor Programming 3 12-05-2003 09:33 PM
Hiding tmiles Linux - Security 4 08-10-2001 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:01 AM.

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