The hosts tag has no wiki summary.
1
vote
1answer
25 views
Changing the server name
I changed the name of the hosts in /etc/hosts to
IP.GOES.HERE newname
Apache does recognize the new server name; but still, via ssh i get this on the ssh prompt:
[root@oldname]
Why? Where else ...
3
votes
1answer
35 views
date format in /etc/hosts.allow
I have following line in my /etc/hosts.allow
sshd: 1.2.3.4 : spawn (echo `date` ALLOWED from %a >> /var/log/%d.log) &
The problem is, the date command prints time in the standard format, ...
4
votes
4answers
162 views
Host lookup that respects /etc/hosts
Utilities like host and dig let you see the IP address corresponding to the host name.
There is also the getent utility that can be used to query /etc/hosts or other NSS databases.
I am looking for ...
4
votes
1answer
89 views
Alternative to DNS for internal servers
I am setting up my first network at work. All the servers are running CentOS 6.3 and have statically assigned IP addresses.
For example:
server1 192.168.0.101
server2 192.168.0.102
I want to be ...
2
votes
2answers
809 views
/etc/hosts file refer to another configuration file
How can I get the /etc/hosts file to refer to another configuration file for it's list of hosts?
Example /etc/hosts:
## My Hosts
127.0.0.1 localhost
255.255.255.255 broadcasthost
#Other ...
0
votes
0answers
57 views
Where to learn about linux servers? [closed]
As you know many hosting providers provide many types of systems for their servers. I'm in a shared hosting and I know how to use the cPanel but now I want to move maybe to VPS or dedicated server and ...
3
votes
2answers
438 views
Creating alias to domain name with /etc/hosts
I have a domain setup to point to my LAN's external IP using dynamic DNS, because my external IP address changes frequently. However, I want to create an alias to this host, so I can access it with ...
2
votes
1answer
522 views
Static IP address shifting to 192.168.1.251
I have a system with a static IP address of 192.168.1.150. I configured /etc/network/interfaces manually (i.e. without using NetworkManager.) It is a web server hosting three sites. I am having ...
9
votes
1answer
515 views
How can I override the /etc/hosts file at user level? [duplicate]
Possible Duplicate:
Can I create a user-specific hosts file to complement /etc/hosts?
In short: I would like to know if it is possible to get a ~/hosts file that could override the ...
0
votes
1answer
60 views
Redirecting head output for update hosts file [duplicate]
Possible Duplicate:
How can I make iconv replace the input file with the converted output?
I'm writing a script to change the content of my hosts file but I got stuck on the head output ...
7
votes
1answer
371 views
Why does SSH not consult /etc/hosts?
I'm administrating a networked environment where the users authenticate over NIS.
All machines can be used to SSH into the server but one.
On the machine in question, I get the message
ssh: connect ...
1
vote
2answers
80 views
Is there some kind kind of hosts.additional file for Linux
If you have a list of servers all linking to each other by static addresses, is there some kind of hosts.additional you can use as some kind of file based DNS?
ie The hosts file contains static ...
1
vote
1answer
219 views
Changing host file in Ubuntu
I tried to change /etc/hosts to change a local DNS entry, so I can map any website name to any IP, but it isn't working. How can I debug it?
2
votes
0answers
138 views
why is FQDN using external IP address
When postfix connects to the FQDN dur.bounceme.net it uses the external IP address:
root@dur:~#
root@dur:~# tail /var/log/mail.log
Aug 28 04:39:45 dur postfix/master[6667]: terminating on signal 15
...
9
votes
2answers
657 views
Two different /etc/hosts depending upon the time
I am trying to make a productivity suite for myself. My first goal is to block Facebook, Gmail and Stackexchange from 0900 to 1600.
As of now, I have edited my /etc/hosts and added 0.0.0.0 ...
4
votes
2answers
2k views
How can I configure /etc/hosts file to point to apache web server?
I have installed apache web server and I need to point 127.1.1.1 with alias (www.someaddress.lan) to local apache. What is the proper way to do it? How to point someaddress.lan to default apache page ...
1
vote
1answer
140 views
Centos apache virtual hosts definition
Please excuse me if my logic is flawed as I am really new to Centos.
I know I can define multiple virtual hosts in my httpd.conf file.
But what I would like is to define virtual hosts in individual ...
2
votes
4answers
1k views
Hosts file modification not used
I added an entry to my hosts file for the development of a website.
I put a new line in /etc/hosts
xx.xx.xx.xx www.mysite.com
But even after a reboot when I use chrome or firefox the host name is ...
1
vote
1answer
621 views
How to use localhost in browser instead of localhost:10088?
Installed zend-server CE.
I would like to use this port (10088).
But anytime I enter localhost I should enter localhost:10088, because localhost doesn't work.
In the hosts file I tried to enter ...
3
votes
2answers
525 views
Wget - Mirroring a full website with requisites on differents hosts
I am trying to make a full static copy of a wordpress website with wget to be browsed without any network connection (all links and images must be converted).
The different requisites for the pages ...
1
vote
2answers
214 views
Simple command that switches between two host files
I am using /etc/host to map localhost to a web domain. I would like a fast way of doing this rather than searching and replacing every time. I put this in my .bashrc file.
alias hostchange='
...
3
votes
3answers
1k views
/etc/hosts file syntax. Is it possible to set one IP for a zone?
I would like to set one IP for a zone (livejournal.com)
currently I am having to directly type the subdomains like:
11.11.11.11 sub1.livejournal.com
11.11.11.11 sub2.livejournal.com
11.11.11.11 ...
2
votes
1answer
841 views
Hosts file on server with dynamic DNS?
I am setting up a RHEL-based server that is associated with dynamic DNS from DynDNS, with a domain of, say, "abc.dyndns.org" that is dynamically updated with the server's IP address.
I have read that ...
3
votes
2answers
397 views
Local DNS rewrite from host to host for web requests
Is there some de-facto way for rewriting certain hostnames to other ones? Something like /etc/hosts for host to host instead of ip to host. Is this possible or should I create a local dns cname for ...
0
votes
1answer
748 views
/etc/hosts in debian resets itself on reboot
I've been having a problem where when our vps provider decides to restart the server (running Debian 5.0.8), the server fails to remember changes to /etc/hosts. All I need is an database alias that ...
2
votes
1answer
394 views
ignore hosts file in ZSH ssh/scp tab-complete
I use a hosts file to block ads/malware domains. When I use ssh or scp in zsh and try to tab-complete, it takes a good 5-10 seconds before anything appears and what does appear is usually a list of ...
6
votes
2answers
7k views
Format of /etc/hosts on Linux (different from Windows?)
Pasted below this question is a sample of a /etc/hosts file from a Linux (CentOS) and a Windows machine. The Linux file has two tabbed entries after the IP address (that is localhost.localdomain ...
3
votes
2answers
4k views
/etc/hosts for Debian
I was trying to get a perl script that contacts a PostgreSQL database to work on a server. This script was mysteriously failing. I then realised that localhost was not in the /etc/hosts file.
The ...
23
votes
4answers
7k views
Can I create a user-specific hosts file to complement /etc/hosts?
Is it possible to add a list of hosts that are only specific to a certain user? Perhaps a user-specific hosts file?
This mechanism should also complement the entries in the /etc/hosts file.
3
votes
1answer
2k views
Using /etc/hosts or iptables to redirect site to https:// version
I'd like to have my system automatically take me to https://facebook.com even if I put http://facebook.com into my browser. I can get /etc/hosts to redirect to me to different domains, but it seems ...
4
votes
2answers
1k views
Maintaining `/etc/hosts` for hosts on DHCP
On my local DHCP network I have different PC's that I need to access remotely. Problem is that their IP's change. Sometimes I plug my laptop and netbook into other people's DHCP networks.
My current ...
