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
13
votes
5 answers

Renting a dedicated, but getting a VPS. How to detect?

When renting a dedicated server, how can one be certain than he/she is not getting a VPS or some other virtual machine variant instead of a true dedicated hardware box? Which checks can be run (assuming it is a linux box) to detect such case?
mr-euro
  • 848
  • 3
  • 14
  • 31
13
votes
2 answers

/etc/hosts , /etc/sysconfig/network and hostname?

I need to do the hostname changes on a centos server which will serve www.myserver.com What do I need to do in /etc/hosts, /etc/sysconfig/network and with the hostname command? In /etc/sysconfig/network do I need to write this…
benjisail
  • 1,331
  • 5
  • 19
  • 32
11
votes
2 answers

Can host aliases be assigned to deployments in Kubernetes? If so, how?

This article describes how to assign host aliases to pods in kubernetes, is there anyway to do it for a deployment and not for a pod as such? Any other suggestions to add host entries in kubernetes to provide a first line of host name resolution…
Ulukai
  • 909
  • 2
  • 12
  • 29
11
votes
3 answers

Size Limit of /etc/hosts (Linux)

Does anyone happen to know what the theoretical size limit of /etc/hosts is on a Linux system before you might start to see degradation in performance? Furthermore, can anyone point me towards some official source that states what the expected limit…
MikeP90
  • 113
  • 1
  • 4
11
votes
7 answers

Can a long /etc/hosts file slow DNS lookup?

I'm facing a little question here. I have a long /etc/hosts file. (working in the web, so I'm hosting a lot of sites locally for developping). Let's says it is about 40, 50 lines long. All redirecting to 127.0.0.1. Now when checking Chrome's…
Zenklys
  • 543
  • 3
  • 5
  • 14
10
votes
2 answers

How to add non-latin entries in hosts file

Is there a way to add non-latin entries in /etc/hosts on windows? Something like 127.0.0.1 локалхост Tried the code above and also punycode with no luck Yes, i know that this would break almost any app and wouldn't pass any validation. I only…
Drath Vedro
  • 339
  • 1
  • 6
10
votes
2 answers

Hostnames in HAProxy configuration file

My haproxy.cfg file has two backend servers using hostnames: server ops-ca-revealv2e-prod-1 ops-ca-revealv2e-prod-1:443 cookie ops-ca-revealv2e-prod-1 ssl weight 1 maxconn 512 check server ops-ca-revealv2e-prod-2 ops-ca-revealv2e-prod-2:443 cookie…
Naijaba
  • 203
  • 1
  • 2
  • 6
7
votes
1 answer

How is priority determined in /etc/hosts?

For reasons too specific to detail here... I have tried to add two entries for a domain to the /etc/hosts file on a CentOS-7 server. In order for one piece of software to run happily, there needs to be an entry like: 192.168.1.z …
Chris Throup
  • 171
  • 1
  • 1
  • 4
7
votes
2 answers

How do I setup a HOSTS file on different operating systems?

Please provide examples of how this can be setup on client and server versions of various operating systems.
Brian Lyttle
  • 1,757
  • 1
  • 17
  • 17
7
votes
3 answers

Is it true that hosts doesn't work in VPN?

C:\WINDOWS\system32\drivers\etc\hosts Seems it's no longer working after I switch on the VPN. Is it the case ,or just my own mistake?
flv
  • 83
  • 1
  • 1
  • 3
6
votes
3 answers

Same IP on many systems in different environments

I work in an environment where there are multiple locations, and in each locations we have the same IP addressing scheme, that is, we have many machines (one in each location) that share the same IP address (the hostnames are different though).…
Dan Nestor
  • 220
  • 1
  • 2
  • 7
6
votes
5 answers

DHCP: Logging host declarations in log file

I am currently running ISC-DHCP server v3 on Ubuntu 8.04. What I am trying to do is log Who got what IP address when. Currently in the DHCP log file you can see the following: DHCPDISCOVER from d0:50:56:ac:74:71 via eth0 DHCPOFFER on 208.x.x.75…
jinanwow
  • 443
  • 6
  • 15
6
votes
5 answers

hostname -f says "hostname: the specified hostname is invalid". Guess why?

hostname -f says "hostname: the specified hostname is invalid". The hostname (FQDN) specified in /etc/hostname is also listed in /etc/hosts and is pingable. No actual DNS server yet of the host knows. Is this a reason of the error reported or…
Ivan
  • 3,398
  • 19
  • 50
  • 71
5
votes
5 answers

Add temporary entry to hosts, when tunnelling SSH

When outside our company firewall, I use a script to tunnel via SSH and expose our internal wiki to my OSX machine. Is there a command to temporarily tell OSX to resolve to my local port when the tunnel is set up? The sequence I'm hoping to use…
pufferfish
  • 2,830
  • 11
  • 39
  • 40
5
votes
2 answers

What's required for a nameserver to be registered?

I'm trying to change nameservers for some of my domains at GoDaddy, but I occasionally run into "Nameserver not registered" problems, and then I'm not allowed to set the nameservers. Here are the cases I've tried, and I still don't understand what…
Lin
  • 2,909
  • 7
  • 27
  • 25
1
2
3
18 19