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
0
votes
2 answers

Is a matching entry in /etc/hosts required for hostname?

I was installing a Tomcat webapp that refused to work until I stumbled on someone else's issue with an unrelated product. The solution was to add the machine's name to /etc/hosts, to match the name returned by hostname. Is this required for…
0
votes
2 answers

RHEL 5.1 loses changes to /etc/hosts above lines for `localhost`

Is there a known fix (other than upgrading from 5.1) to fix /etc/hosts from being replaced on reboot? I discovered this behavior when running HP's Server Automation tools. HPSA sets-up a variety of local aliases for itself to use for different…
warren
  • 18,369
  • 23
  • 84
  • 135
0
votes
1 answer

An alias (defined as a hosts entry) for a fileserver works only when it is a win2008-box, why?

On a Terminalserver (win2008), we like to have an alias for the real fileservername and therefor we put a line in hosts like: 192.168.0.10 BigFiler This only works fine for Fileserver under windows 2008 not for win2003-servers, why? We do not…
Ice
  • 404
  • 1
  • 7
  • 16
0
votes
3 answers

HOSTS / LMHOSTS files on XP System in a AD Domain

I have found that with in my Active Directory (Windows 2003 Interm), there are 4 DC and each is a GLOBAL CATALOG SERVER. So in theory any should be able to authenticate users. that our XP Clients have a lengthy HOSTS and LMHOSTS file (that are both…
0
votes
0 answers

Trying to access to my server's Cpanel (:2083) gets resolved as localhost:2083, not found

I'm currently working on a Linode Ubuntu 20.04 VPS with a cPanel installation. Upon trying to access to the control panel (:2083), the browser resolves the IP to localhost:2083 and fails to open the control panel. I've setup my /etc/hosts…
0
votes
2 answers

Nginx reverse proxy only specific sub directory and pass through everything else

I have development situation where i have a domain with multiple services: https://somewebpage.com On this service there are multiple project as subdirectories https://somewebpage.com <- landing page https://somewebpage.com/api <- rest api…
Gregor
  • 1
  • 2
0
votes
0 answers

Updating Ubuntu broke permanent etc/hosts configuration

I use /etc/cloud/templates/hosts.debian.tmpl file to have permanent /etc/hosts/ rules for my Ubuntu server (ver 22). Today I updated the server but I had troubles with Nginx Proxy setup on my server, after a couple of hours to find the problem with…
doraemon
  • 99
  • 3
0
votes
2 answers

How do allow a range of IPs in /etc/hosts.allow but deny a single IP within that range in /etc/hosts.deny?

My /etc/hosts.allow file contains: sshd: 225.73. , 164.41. My /etc/hosts.deny file contains: sshd: 225.73.24.25 , 164.41.45.63 The problem I'm facing is that if I try to SSH from 225.73.24.25 or 164.41.45.63 the server is allowing me to SSH…
CP3O
  • 101
  • 1
0
votes
0 answers

Using burp to redirect all traffic to a specific domain (and all subdomains) to a different ip address

there is a site a.com with many subdomains b.a.com, c.a.com etc... assume that the ip address of a.com (what the dns returns) is a.a.a.a I want to redirect all traffic to a.com and it's subdomains to another ip address, b.b.b.b How can I do…
GalSuchetzky
  • 111
  • 2
0
votes
1 answer

Why is *.localhost resolved automatically on Ubuntu but not on MacOS?

I have the same hosts file on both Ubuntu and MacOS. 127.0.0.1 localhost On Ubuntu: my-ubuntu$ ping foo.localhost PING foo.localhost(ip6-localhost (::1)) 56 data bytes 64 bytes from ip6-localhost (::1): icmp_seq=1 ttl=64 time=0.129 ms 64 bytes…
floatingpurr
  • 103
  • 1
  • 5
0
votes
1 answer

Kubernetes pull from image private network / fails to respect /etc/hosts of server

(Reposted from original post at: https://stackoverflow.com/questions/73012913/kubernetes-pull-from-image-private-network-fails-to-respect-etc-hosts-of-serv as this is a more appropriate place to ask the question) I am running a small 3 node test…
Aaron Murray
  • 139
  • 2
  • 8
0
votes
1 answer

force mysqld to use etc hosts for reverse lookup

I have a server hosted by hetzner running mysqld. I already setup some "ddns for poor ones" to add my dial-on IP (Telekom) to the server's /etc/hosts. Now all Users in mysql are limited to localhost, but my development machine at home must also…
Synopsis
  • 9
  • 2
0
votes
1 answer

sendmail and pacemaker require different /etc/hosts

Trying to make run sendmail (required by fail2ban, or it takes forever to start-stop-restart it) and pacemaker on one machine. Sendmail wants machine's hostname resolved as 127.0.0.1, pacemaker - as 192.168.100.1, otherwise they both don't work…
0
votes
1 answer

How to use hostnames in smtp_bind_address in Postfix configuration?

It seems that Postfix does not allow hostnames in the smtp_bind_address config parameter. But it does allow hostnames in inet_interfaces. For SPF I want to make sure which address SMTP-clients bind to and I wanted to do this with an IP-independent…
Robert Siemer
  • 542
  • 9
  • 19
0
votes
0 answers

nginx reverse proxy not serving local domain correctly

I want to resolve a few domain names locally in my computer. To do this I added in /etc/hosts the following line: 127.0.0.1 example.com Then I configured nginx with the following config file example.com.conf server { server_name example.com; …
Mnemosyne
  • 131
  • 1
  • 7