Questions tagged [hosts]

/etc/hosts is the configuration file with locally known mappings between domain name and ip address.

/etc/hosts is the configuration file with locally known mappings between domain name and ip address. It can be used to define new or override existing mapping, bypassing the DNS that would normally resolve it.

271 questions
2
votes
2 answers

HOSTALIASES with Fully qualified domain names

I am trying to point a fully qualified domain name "example.com" to an external host such as Amazon ELB "site-xxxxxx.us-west-1.elb.amazonaws.com" using HOSTALIASES environment variable and it's not working. example.com …
Aftab Naveed
  • 153
  • 1
  • 7
2
votes
1 answer

Can rsyslogd use /etc/hosts file instead of DNS?

I have a problem with rsyslogd using DNS to PTR-resolve each remote host's name. Is there a way to use the '/etc/hosts' to do same job and disable resolution using DNS?
dzhivkov
  • 21
  • 3
2
votes
5 answers

How to copy /etc/hosts to all my machines?

import os, sys, time servers = ['dev','admin','db1'] for s in servers: cmd = 'scp /etc/hosts regular_user@%s:/etc/hosts' % s print cmd os.system(cmd) I have written this script to copy my current HOSTS file to all my other…
Alex
  • 8,471
  • 26
  • 75
  • 99
2
votes
2 answers

Windows hostname not resolving to hosts file entry

I have a Windows Server 2012 instance running software that requires that it map its hostname OW5000 to its IP Address. However, when pinging OW5000, it resolves to ::1. In this instance, the software will not work. It requires the IP, let's say…
dthree
  • 367
  • 1
  • 8
  • 26
2
votes
1 answer

AWS EC2 Describe Instances - Filtering by Multiple EC2 Tags?

I'm attempting to dynamically create a hosts file mapping with all my ec2 instance private ip's, to use as the /etc/hosts on my ec2 remote ssh server. I have instances tagged with their normal "Name" eg. prod-database-01 and an "Alias" tag eg.…
2
votes
2 answers

How do I redirect with Apache reverse proxy on server errors

I have several http and game servers on a network and currently use an Apache2 reverse proxy to divvy out traffic between domains and machines. I am getting a significant amount more traffic to one machine in particular than others. I would like to…
Justin Grimes
  • 127
  • 1
  • 2
  • 10
2
votes
1 answer

Make Linux server route packets destined for its external ip to localhost

I've a router with a certain static ip a.b.c.d that's connected to a Linux server on one side and to the internet on the other. Accessing a software installed on the Linux server from outside using the IP address a.b.c.d:portxx works fine.…
curious_cat
  • 359
  • 2
  • 10
2
votes
1 answer

windows hosts: how can I redirect HTTPS site?

I have that in my host 127.0.0.1 block.opendns.com It works when I use: http://block.opendns.com But does not work when I use: https://block.opendns.com Any idea how to use hosts with an HTTPS site ?
yarek
  • 827
  • 5
  • 13
  • 22
2
votes
2 answers

Using Ansible to provisioning users: Modify facts/expand hostvars?

First off, I apologize for the terrible title. I'm not entirely sure how to succinctly describe the problem. So here's my challenge. I'm working on provisioning database users and would like a flexible method of defining users. I'm encountering a…
2
votes
1 answer

In /etc/hosts is there something special about the first hostname for any given line?

I know that the first one is said to be canonical, but I don't fully understand the practical implications. This question was triggered by the man page for hostname -f, specifically when it says: Technically: The FQDN is the name…
damix911
  • 121
  • 3
2
votes
4 answers

How do I allow my computer to refer to itself as any ip on 192.168.1.*?

I'm using a Mac OS X, and I'm trying to begin using VirtualHost functionality with Apache2. I've created and loaded up a hosts file that looks like this: 127.0.0.1 localhost 192.168.0.71 name1 192.168.0.71 name2 Right now, I can only…
stalepretzel
  • 834
  • 4
  • 15
  • 19
2
votes
1 answer

Simulate a DFS share for a user not on domain with a folder in path

I have a consultant whose computer is not on the domain and needs to access various network resources. Unfortunately while adding a computer to the domain is a difficult bureaucratic process (and would disallow much of his development software from…
user223655
  • 21
  • 1
  • 2
2
votes
3 answers

Apache 2.4 - 403 HTTP status code

I'm getting a 403 error message with Apache, in Debian Testing. Apache version: # aptitude show apache2 | grep -i version Version: 2.4.9-1 # ls -la /home/ total 28 drwxr-xr-x 4 root root 4096 Apr 3 13:19 . drwxr-xr-x 23 root root …
2
votes
3 answers

Bypass DNS Server lookup by using /etc/hosts when using a dynamic IP address

It is my understanding that the need to query external DNS servers for commonly accessed names can be reduced if those commonly accessed names are present in /etc/hosts. Now, I have a situation where in I have an Embedded Linux box with a dynamic…
xorsi
  • 23
  • 1
  • 1
  • 4
2
votes
1 answer

Why use FQDN as DNS-server option in DHCP?

I've seen multiple default configurations of DHCP-servers with a FQDN set as the DNS-server option. Doesn't this imply a catch-22, or the need for that DNS-server to be in the hosts file of every single client? example from dhcp3-server in debian…
Filip Haglund
  • 371
  • 4
  • 11