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
1 answer

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 it would be that the domain name had not been…
Lerner Zhang
  • 113
  • 5
0
votes
1 answer

Why are my HOSTS file changes not taking effect in Windows 10?

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: 127.0.0.1 google.com To stop a page…
Tikhon
  • 87
  • 1
  • 9
0
votes
1 answer

How does a node differentiate between an IPv4 and IPv6 datagram?

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?
Newbie123
  • 19
  • 1
0
votes
2 answers

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 WebDav connections over the LAN/VPN when they are…
Bryan C.
  • 101
  • 2
0
votes
1 answer

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 expected and (successfully) 404's. Editing the…
ti7
  • 215
  • 2
  • 9
0
votes
1 answer

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 resolve itself Does anyone know what fills that data or can…
Malazzar
  • 21
  • 3
0
votes
1 answer

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 to another server, when I ping the FQDN on the…
Andez
  • 101
  • 2
0
votes
1 answer

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 gateway; and is accessed via Local Port…
leeand00
  • 4,869
  • 15
  • 69
  • 110
0
votes
2 answers

Ansible: How to Remove /etc/hosts entries on the remote server using Ansible playbook. I need only the default entries to be present

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.localdomain localhost4 localhost4.localdomain4 ::1 …
celcoprab
  • 43
  • 2
  • 3
  • 8
0
votes
2 answers

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 mydomain.com mail.mydomain.com" >> /etc/hosts what…
hotfix
  • 101
  • 1
0
votes
1 answer

How to avoid HSTS error by hosts redirect with self-signed certificate?

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 need to get redirect to my server So, how i need to…
0
votes
2 answers

Can cloudflare cause /etc/hosts entries to be ignored?

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 for DNS. For some reason I cannot serve (get a HTTP…
-1
votes
2 answers

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 because of the site builder the use, they are unable to…
John Durchak
  • 11
  • 1
  • 4
-1
votes
1 answer

Block URL with path in /etc/hosts?

I am working on OSX and I want to block access to an individual URL (a twitter profile) in /etc/hosts. Is this possible? I've tried adding: 127.0.0.1 twitter.com/mypath 127.0.0.1 www.twitter.com/mypath and then running sudo dscacheutil…
Richard
  • 263
  • 2
  • 5
  • 11
-1
votes
1 answer

isc-dhcp host using files

I configured ise-dhcp-server, which works fine, but my dhcpd.conf is starting to become very big. I'm trying to find information (without results), on whether it's possible to use something like import /path/to/file. I want to use it to set static…
DevAxeQuestion
  • 165
  • 1
  • 9