Questions tagged [hosts]
/etc/hosts is the configuration file with locally known mappings between domain name and ip address.
271
questions
0
votes
0
answers
47
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 ...
0
votes
2
answers
147
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 ...
0
votes
0
answers
46
views
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, ...
-1
votes
1
answer
33
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 ...
0
votes
2
answers
619
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....
0
votes
0
answers
86
views
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 ...
0
votes
1
answer
694
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 (:...
0
votes
1
answer
498
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
219
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 ...
0
votes
1
answer
55
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
1
answer
267
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 ...
0
votes
0
answers
498
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....
0
votes
1
answer
45
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 ...
0
votes
1
answer
5k
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:...
1
vote
1
answer
407
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
634
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
132
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
344
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
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.
0
votes
1
answer
348
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 ...
0
votes
1
answer
198
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
330
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
622
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 ...
17
votes
1
answer
14k
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 ...
2
votes
2
answers
7k
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 ...
0
votes
1
answer
259
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....
0
votes
2
answers
512
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 ...
0
votes
1
answer
1k
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
1k
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 ...
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 ...
-1
votes
1
answer
537
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....
1
vote
2
answers
378
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 /...
-1
votes
1
answer
540
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 ...
0
votes
1
answer
1k
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 ...
2
votes
0
answers
126
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 ...
-1
votes
1
answer
151
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 ...
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....
3
votes
6
answers
4k
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 ...
2
votes
2
answers
3k
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 ...
1
vote
1
answer
2k
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
151
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?
1
vote
1
answer
681
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 ...
10
votes
2
answers
29k
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 ...
0
votes
1
answer
189
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.. ...
1
vote
1
answer
242
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 ...
0
votes
0
answers
52
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....
0
votes
2
answers
502
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 ...
1
vote
0
answers
25
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 ...