Questions tagged [hosts]
/etc/hosts is the configuration file with locally known mappings between domain name and ip address.
268
questions
3
votes
1
answer
9k
views
How to configure ldap to resolve host names?
I'm new to LDAP and I already configured accounts with LDAP so I can login on few computers with LDAP.
Now I would like to add some host names to LDAP. In /etc/nsswitch.conf I changed:
hosts: ...
6
votes
6
answers
29k
views
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. ...
7
votes
2
answers
12k
views
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 ...
3
votes
3
answers
9k
views
Wireguard VPN connection not resolving local host names
I have setup a Wireguard VPN on my raspberry pi and I can connect to it via client app on my mobile phone. I can access the internet though the phone and I confirm that the phone is using the same IP ...
4
votes
7
answers
6k
views
Setting a custom /etc/hosts or resolver for one process only in Linux
On Linux, I want that a particular process should resolve host "xyz.com" to IP "10.1.2.3". That's easy: just add a line to /etc/hosts.
However, I only want to do this for one process; I want all ...
12
votes
7
answers
19k
views
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 ...
0
votes
2
answers
836
views
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 ...
36
votes
3
answers
58k
views
How is DNS lookup configured for OSX Mountain Lion?
If I cat my resolv.conf, I see this message:
#
# Mac OS X Notice
#
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# ...
0
votes
2
answers
2k
views
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....
-1
votes
1
answer
41
views
Windows redirection to a new Network Folder (from \\OldDirectory to \\NewDirectory)
We have relocated our files to a new folder (from \\oldfolder\... to \\newfolder\...). I would like to know if on windows it is possible to redirect all the request to the new path (because we have a ...
50
votes
9
answers
157k
views
Assign multiple IPs to 1 Entry in hosts file
I have a web sever that connects to an internal database through a VPN. There are 2 IPs (primary and secondary) to the database from the web server. How can I setup my /etc/hosts file so that if the ...
0
votes
0
answers
707
views
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....
18
votes
1
answer
17k
views
How to manually trigger an update of /etc/hosts in WSL? [closed]
When I start the first WSL terminal (ubuntu 20.04 bash in my case), WSL generates the /etc/hosts file based on the host file of my windows system %WINDIR%\System32\drivers\etc\hosts.
If I now change ...
0
votes
1
answer
707
views
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 ...
17
votes
5
answers
135k
views
What can cause a DNS lookup to ignore a hosts file entry?
I'm having a DNS resolving issue that is affecting the performance of my locally hosted web site when browse it on my local machine. If I attach my network's DNS suffix to my local machine name when ...
3
votes
1
answer
2k
views
Squid ignoring hosts file (using SquidMan on Mac)
I installed SquidMan 3.1 on my Mac, and it works fine. But I really need it to redirect some of the traffic using my hosts file, and it seems to be ignoring it no matter where I put it.
So far I've ...
29
votes
1
answer
40k
views
How can /etc/hosts be used to associate multiple domains with a single IP?
I have a single IP (81.174.66.48) and I would like to use /etc/hosts to associate multiple domains with that IP. Currently my hosts file looks like this:
81.174.66.48 nerto.it nerto
I would like ...
0
votes
1
answer
1k
views
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
vote
1
answer
3k
views
Can ping NAS by ip and hostname in Windows 10 console, but not find by ip or hostname in Windows explorer
I have set up a new PC with Windows 10. Now I want to access two local NAS drives but can't connect to them. With my old PC and all coworkers pcs everything is fine. There is no special access ...
0
votes
1
answer
1k
views
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 ...
0
votes
1
answer
311
views
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 ...
212
votes
13
answers
580k
views
hosts file ignored, how to troubleshoot?
The hosts file on Windows computers is used to bind certain name strings to specific IP addresses to override other name resolution methods.
Often, one decides to change the hosts file, and discovers ...
0
votes
1
answer
65
views
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 ...
0
votes
3
answers
2k
views
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 ...
25
votes
13
answers
72k
views
HOSTS file being ignored
My (Windows XP, Professional, v2002, SP3) workstation is completely ignoring my hosts file.
Here is the code in my hosts file:
127.0.0.1 localhost
172.17.1.107 wiki
But, when I open a ...
0
votes
1
answer
113
views
Why the IP cannot be used directly when the IP mapped to the host name as a host entry works?
I was given an API for a service through which I tried to send a post message from server A, but the connection cannot be built. Then I ping the domain name in the API. It doesn't work, so I thought ...
1
vote
1
answer
9k
views
Why are my HOSTS file changes not taking effect in Windows 10? [closed]
I made a change to my hosts file on my Windows 10 machine today, however after saving the changes in Notepad (running as admin) the changes do not appear to work.
For example I would expect this entry:...
24
votes
4
answers
65k
views
hosts file seems to be ignored
I have almost fresh Ubuntu desktop box. OS was installed two weeks ago and updated from karmic repositories. Last week I had no problems with DNS. But this week something had changed. I'm not sure ...
1
vote
1
answer
786
views
How to give alternate name to localhost for sharing on windows?
I have a jenkins production job which involves multiple nodes/slaves and when we run the job it utilizes them based on the slave mentioned.
And also, it has access to some machines shared folders.So ...
1
vote
1
answer
979
views
How does linux resolve wildcard locahost subdomains (e.g. : `ping test.localhost`) when `test.localhost` does not exist in /etc/hosts or dns server?
For example in ubuntu 20.04 LTS where the /etc/hosts file is empty:
>>> cat /etc/hosts
127.0.0.1 localhost
ping still works for any subdomain of localhost:
>>> ping test....
0
votes
1
answer
159
views
How does a node differentiate between an IPv4 and IPv6 datagram? [closed]
In a computer network, how do hosts and routers tell if a datagram is IPv4 or IPv6? Do they just look at the version number field of the packet header?
0
votes
2
answers
450
views
Is there a way to have a PC to resolve IP for a local server while on the LAN/VPN but an external IP when not?
I have a Nextcloud server on my LAN (with an external port forward for outside access) that I am setting up WebDav connections on for a collection of Windows 10 PCs and I want the users to make their ...
1
vote
2
answers
3k
views
How do I serve a localhost projects on a made up domain, such as mysite.test and testing.test simultaneously?
If this is possible it would save a lot of headaches. I would like to bind made up domains to localhost projects, if that is possible. I am on Ubuntu 20.10.
0
votes
1
answer
254
views
Which service/process fills the default value of /etc/hosts?
I'm running a custom OS based on ubuntu 18.04. I've ran into a problem - when the machine gets installed it sometimes doesn't have the value "127.0.1.1 hostname" in /etc/hosts. So it can't ...
0
votes
1
answer
638
views
curl prioritize the IP provided to resolve arg (or another) over other DNS options
When attempting to use curl to get around a misconfigured DNS entry (experimenting and not known at the time), --resolve seemed like the right way to go. However, the argument didn't behave the way I ...
1
vote
1
answer
454
views
Exclude subdirectory from host resolution set in /etc/hosts (with dnsmasq, or anything else)
I have a local development tool (LocalWP) that sets the path to my local environment by modifying /etc/hosts.
For example, if I set my site in Local to www.foo.com, it'll append the following to the ...
0
votes
1
answer
1k
views
Refresh host a records for a server when changed in domain controller
In Active Directory DNS Manager, when I change the IP Address of a Host A record, how can I ensure the changes are replicated to all or specific computers in the domain.
When I change the IP Address ...
10
votes
2
answers
14k
views
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-...
5
votes
5
answers
6k
views
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 ...
2
votes
1
answer
3k
views
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?
0
votes
1
answer
336
views
If an SSL certificate's name must match the name entered into the browser, what do you do with SSH Local Port Forwarding?
If the SSL certificate must match the name entered into the browser; what if the name entered into the browser is https://localhost:8080, in the case of accessing a server that is behind an SSH ...
0
votes
2
answers
2k
views
Ansible: How to Remove /etc/hosts entries on the remote server using Ansible playbook. I need only the default entries to be present [closed]
How to Remove /etc/hosts entries on the remote server using Ansible playbook. I need only the default entries to be present.
I need only below entries to be present:
127.0.0.1 localhost localhost....
2
votes
3
answers
2k
views
wget not working with domain on local machine
Basically - I have some PHP scripts that need to be run as cron jobs.
Lets say the script needing to be run is: http://admin.somedomain.com/cron_jobs/get_stats
If I run the script from the local ...
0
votes
2
answers
845
views
what IP should be used in hosts when setting up the mail server?
I'm setting up a mail server on my debian by following the tecmint tutorial.
In step 4 the ip should be added in the hosts file.
# hostnamectl set-hostname mail.mydomain.com
# echo "192.168.0.102 ...
3
votes
2
answers
2k
views
Transparent Proxy or VPN that listens on all ports [closed]
I'd like traffic to be routed via a proxy or VPN based on a the client's hosts file (or DNS that is given to the client).
This doesn't seem like a problem for http traffic on port 80 as a simple ...
0
votes
1
answer
2k
views
How to avoid HSTS error by hosts redirect with self-signed certificate? [closed]
I created this records in windows hosts file
127.0.0.1 a.domain.name
127.0.0.1 b.domain.name
127.0.0.1 c.domain.name
where
127.0.0.1 - ip of my server
[a,b,c].domain.name - domains wich from i ...
0
votes
2
answers
2k
views
Can cloudflare cause /etc/hosts entries to be ignored? [closed]
I've frequently used /etc/hosts to hop back and forth between servers for a domain and also to test if it's serving correctly before a deployment.
However, in this latest case I've used cloudflare ...
-1
votes
2
answers
4k
views
Can one have 2 Domains pointing to the same IP and / or 2 IP's resolving to the same Domain?
I am going to attempt to rewrite the initial question so that it makes more sense.
The issue I was being faced with is that I have my Company's website hosted on Site Ground but unfortunately ...
20
votes
5
answers
94k
views
How to have Windows Server DNS use hosts file to resolve specific host names
[NOTE: The solution of this question is perfect, by something stray away from what the title indicates.]
I'm facing a small problem with Windows Server 2003 DNS service. In my corporation, I'm ...
2
votes
2
answers
4k
views
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 ...