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 |
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). |
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 |
Quote:
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. |
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?
|
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. |
Thanks for your detailed reply timmeke.. I understand what should i do next.
Thanks gk |
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 |
All times are GMT -5. The time now is 04:11 PM. |