Questions tagged [hosts]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
139 views

Trying to access to my server's Cpanel (<server_ip>: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 (<server_ip>:2083), the browser resolves the IP to localhost:2083 and ...
LeperAffinity666's user avatar
0 votes
2 answers
807 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 ...
Gregor's user avatar
  • 1
-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 ...
Adel Chaker's user avatar
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....
CP3O's user avatar
  • 101
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 (:...
floatingpurr's user avatar
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 ...
Aaron Murray's user avatar
0 votes
1 answer
303 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 ...
Synopsis's user avatar
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 ...
yu-boot's user avatar
0 votes
1 answer
666 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 ...
Robert Siemer's user avatar
0 votes
0 answers
700 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....
Mnemosyne's user avatar
  • 131
0 votes
1 answer
104 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 ...
Lerner Zhang's user avatar
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:...
Tikhon's user avatar
  • 97
1 vote
1 answer
776 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 ...
Sara June's user avatar
  • 521
1 vote
1 answer
956 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....
Greg's user avatar
  • 1,677
0 votes
1 answer
157 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?
Newbie123's user avatar
0 votes
2 answers
449 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 ...
Bryan C.'s user avatar
  • 101
1 vote
2 answers
2k 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.
eoyath's user avatar
  • 21
0 votes
1 answer
620 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 ...
ti7's user avatar
  • 215
0 votes
1 answer
243 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 ...
Malazzar's user avatar
1 vote
1 answer
444 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 ...
Orun's user avatar
  • 157
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 ...
Andez's user avatar
  • 101
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 ...
René Link's user avatar
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 ...
BMM's user avatar
  • 191
0 votes
1 answer
325 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 ...
leeand00's user avatar
  • 4,919
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....
celcoprab's user avatar
0 votes
2 answers
821 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 ...
hotfix's user avatar
  • 101
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 ...
Dmytro Likhachev's user avatar
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 ...
Chris Stage's user avatar
-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 ...
John Durchak's user avatar
2 votes
0 answers
2k views

docker-compose containers do not resolv hosts /etc/hosts entries

On my host machine (arch linux) I have a somewhat long list of entries in the /etc/hosts file resolving to remote machines (that are not under my control). The Docker containers of a development ...
Martin Penckert's user avatar
-1 votes
1 answer
592 views

Block URL with path in /etc/hosts? [closed]

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....
Richard's user avatar
  • 263
1 vote
2 answers
429 views

What to use for a hostname on a dedicated Linux server?

I've recently run into Debian wiki not recommending to set exim's primary_hostname explicitly. From what I can gather, here's the code that chooses primary_hostname. Basically, either I have FQDN in /...
x-yuri's user avatar
  • 2,280
-1 votes
1 answer
639 views

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 ...
DevAxeQuestion's user avatar
0 votes
1 answer
2k views

Why proxy server don't use the ip in client hosts file but do dns query?

A website changed DNS server,unable to get the correct ip with the normal dns query. So I have to write domain&ip to etc/hosts (macOS). I can only access this site faster if I use a proxy. Local ...
maP1E bluE's user avatar
2 votes
0 answers
163 views

Correct form of /etc/hosts

I've always thought that the correct format of /etc/hosts was 1.1.1.1 fully.qualified.name shortname alias We're upgrading our core software and some of the vendors utilities are failing as they ...
user1174838's user avatar
-1 votes
1 answer
185 views

How do I setup Sendmail and the FQDN for use with server images

I have loadbalancer sitting infront of serveral webservers. The website served up has a contact form that uses sendmail. I have installed sendmail on one of these webservers: web-01 This is the ...
Shawn Northrop's user avatar
0 votes
1 answer
1k views

Why does name resolution work for a .local adress without DNS?

Recently, I added a FreeNAS server to my local network. I can reach its web interface by opening freenas.local in a browser on my main Windows machine. However, when I do a nslookup freenas....
Liam Bew's user avatar
4 votes
7 answers
5k 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 ...
SRobertJames's user avatar
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 ...
Aftab Naveed's user avatar
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 ...
Askger's user avatar
  • 11
0 votes
1 answer
209 views

Named multicast address

Is it possible to name a multicast or broadcast address? Usually for a single machine I'd put a line in /etc/hosts. Will that work for a multicast address?
z0r's user avatar
  • 165
1 vote
1 answer
896 views

DNS Resolution Sequence in Digital Ocean Droplets

I have setup multiple domains on my droplet and they cross-reference each other. Currently, when I do a nslookup for these domains from within the droplet, the DNS resolution is handled by 67.207.67.3 ...
Mangesh's user avatar
  • 13
11 votes
2 answers
34k views

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 ...
Ulukai's user avatar
  • 919
0 votes
1 answer
201 views

changed hostname - website no longer accessible

I run Centos 7 i was changing /etc/hostname "centos-512mb-blr1-01" to "srv1.domain.com" and rebooted for the changes to take place, since then all my websites are off.. i tried reversing the change.. ...
perlware's user avatar
1 vote
1 answer
265 views

Problems installing Ruby gem on Gandi VPS Debian 9 server

I have a Gandi Debian 9 server that I use for web page hosting. I am trying to install a Ruby gem on the system but it looks like I am either being blocked from installing gems or I need to setup my ...
Dodzi Dzakuma's user avatar
0 votes
0 answers
56 views

local IP redirects to public

I have a website on ubuntu vps.I can access my website through my public valid IP (185.211.88.62) but when computers on local network are not connected to internet and want use local invalid IP (172....
chimia's user avatar
  • 28
0 votes
2 answers
543 views

Fiddler-like host and port remapping using nginx on Linux

I am trying to set up host and port remapping on Linux using nginx as a reverse proxy. So far, I've got a working ghetto hack solution using the if directive, which is evil. Is there a better ...
Danilo Piazzalunga's user avatar
1 vote
0 answers
26 views

Solaris 10 app server operating on two company domains

I have a Solaris server hosting Apache and Tomcat web servers, it originally operated on one company domain: appname1.company1.com With a change in company, this original domain must still be ...
AndW99's user avatar
  • 111
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 ...
pufferfish's user avatar
  • 2,890
1 vote
1 answer
446 views

How to give “Network Service” permissions on another non-domain computer?

I have PostgreSQL running on a Win10 Pro box (called DBServer) on my local network. I need to allow it to read files on my Dev computer (also Win10 Pro) on the same network so it can import files. ...
Brad Mathews's user avatar

1
2 3 4 5 6