Questions tagged [hosts]

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

40 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
806 views

Make ping show hostnames instead of IPv6 addresses

When I use the command ping ff02::1%eth0 to get a response from all IPv6 hosts in the network segment, I get responses from a bunch of link-local (fe80::) addresses (LLIPs). In order to figure out ...
4
votes
2answers
373 views

What application can I use to block hosts with regex?

Is there any tool/application that I can use to block hosts from all forms of connection from my computer? Currently I use /etc/hosts and place the absolute host like this: 127.0.0.1 unix....
3
votes
0answers
178 views

Hosts file no longer ignoring midline comments

I've just upgraded from ubuntu 16.04 to 18.04 My /etc/hosts file has a number of lines in the form: 1.1.1.1 domain1.net domain2.net # domain3.net domain4.net (In other words, I had originally ...
3
votes
0answers
447 views

Absolute domain names in /etc/hosts?

I have a RHEL7.0 host which has this standard entry in /etc/hosts/: 127.0.0.1 localhost.localdomain localhost So resolving localhost.localdomain works: $ ping localhost.localdomain PING localhost....
2
votes
1answer
337 views

Can I use /etc/hosts to whitelist domains?

I set up a little ubuntu box for my son for remote learning and I would like him to only access certain domains in the browser. I was thinking of doing a blanket etc/hosts but I would need to add ...
2
votes
0answers
127 views

Unblocking websites using /etc/hosts

I cannot unblock certain websites that were previously blocked from /etc/hosts. Here is what the file looks like: 0.0.0.0 facebook.com :: facebook.com 0.0.0.0 youtube.com :: youtube.com When I ...
2
votes
0answers
570 views

DNS works half of the time in Oracle VirtualBox and I can't even maintain /etc/hosts file

I have installed three Linuxes on same laptop and same VirtualBox and this is my success ratio with DNS: HortonWorks & CentOS. Worked for 5 minutes and never after that again. VM image ...
2
votes
0answers
1k views

Why is my /etc/hosts.deny file being ignored?

I am using a small embedded linux setup generated by buildroot to run on a x86 device. It was generated to use busybox init system and also runs dropbear so I can ssh into the device. I wanted to ...
2
votes
0answers
223 views

why is FQDN using external IP address

When postfix connects to the FQDN dur.bounceme.net it uses the external IP address: root@dur:~# root@dur:~# tail /var/log/mail.log Aug 28 04:39:45 dur postfix/master[6667]: terminating on signal 15 ...
1
vote
0answers
22 views

Is it possible to configure /etc/hosts on a per network basis?

I have a server at home with a domain name (let's call it domain.name). On my laptop, I have added this line to /etc/hosts: 192.168.1.7 domain.name At home, this is great, but at others places this ...
1
vote
1answer
210 views

Block all websites except Kahn academy

I am trying to set up a ubuntu user so that they can access the Kahnacademy instructional website, but not anything else. In particular, I want to block youtube. There are instructions here but I ...
1
vote
0answers
27 views

Create custom page for lock

I'm new to DD-WRT v3.0-r39469 std (04/10/19) so I have several questions! I want to make a custom LOCKING PAGE in the domain 127.0.0.2 in my network, is it possible? I ran the page to which I wanted ...
1
vote
0answers
96 views

sm-notify: bindresvport on RPC socket failed: Cannot assign requested address

Can't figure out how to make sm-notify work. I've added hostname entry with related IPv4 to /etc/hosts $ cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ...
1
vote
0answers
59 views

Remote not using hosts file from server

I am using a hosts file on an Ubuntu Server where is written all the pairs IP domain names. The remote computers (all of them with Windows OS) are connected to the server on the same network and they ...
1
vote
0answers
867 views

hostname not showing in who command output with RHEL 7.4 after editing in /etc/hosts file

On Redhat 7.4(maipo) server I am seeing issues as below. Prior to RHEL 7.4 let say RHEL 7.3 if I login to server though putty using my local IP 192.168.187.1 and execute who command it was showing ...
1
vote
1answer
479 views

Resolve urls within the server

My problem is urls within my PHP scripts are not resolving correctly. Ie, the domain name I am using in a PHP script doesn't resolve back to the server when accessed from within the server. For ...
1
vote
0answers
150 views

The correct way of implementing adblocking with uzbl?

I though about running some proxy on localhost, but will I be able to filter https? I've tried to use scripts from wiki, but they are not seem to work. Another idea is to implement adblocking using /...
1
vote
1answer
73 views

How did my Hosts file change?

Let me start this by saying I do not or never have had Admin access to my Mac. Issue: Recently when I tried to navigate to the URL dev.local.com which was mapped to a specific IP address in my Hosts ...
1
vote
2answers
543 views

bash completion: how to complete a list of hosts for a specific argument?

My programm can have the following format: <command_name> <arguments> <options> -hosts <host1> <host2> ... <hostn> (<more_arguments>) ... I am trying to set ...
0
votes
0answers
49 views

How to synchronizing /etc/hosts files across multiple linux machines

I have 20 linux servers that use /etc/hosts files to see and talk with each other. I'm adding servers to this pool of servers. It is required to do host resolution via the /etc/hosts files. DNS or NIS ...
0
votes
1answer
32 views

copy files from multiple remote machines to local and create directories for remote machines

Have multiple vm machines that am using for studying, and have come up with this script for copying some files from vm's to my local machine: SG=rohos; date; for i in `cat /etc/hosts | grep "$SG-&...
0
votes
0answers
17 views

Chrome (on OS X) seems to be able to magically circumvent /etc/host redirects

For security reasons, I replace /etc/hosts on my machine with a version that redirects many domains to 127.0.0.1. Mostly this works fine, and I test by ping and by trying to browse to those sites. ...
0
votes
1answer
35 views

How do I get the inside of the network to see the server properly? Inside the network, foobar.net doesn't resolve

I'm running MINT 20.1. I am connected to the net via AT&T UVERSE fiber optic. I have a DNS, foobar.net, set up to point at my router, and when I am outside the network, I can load a website ...
0
votes
0answers
39 views

Why is the IP address lookup in /etc/hosts only sometimes work?

The '/etc/hosts' file in a Linux laptop (with LAN IP 172.17.37.21) by default contains : 127.0.1.1 Acer-Aspire-6930G When I want to reach this laptop wirelessly from a smartphone or a PC using an FTP ...
0
votes
1answer
76 views

Is there a distro specific to the LAMP stack?

I tried real hard to get LAMP stack working on my pop_os home pc, but could not get it working. Is there a distro in existence with the LAMP stack preinstalled which I can just add WordPress on top of....
0
votes
0answers
40 views

Apache2: Hosting Multiple Sites (Ubuntu Server)

I am new working with system.d and services on ubuntu/debian. I'm trying to serve multiple sites on the same Apache2 (I am note sure if I should have 3 apache2 folders for the each service). The ...
0
votes
0answers
43 views

mDNS instead of IP in /etc/hosts?

I have a laptop that I want to communicate with from my other PC. Sometimes I need to connect with this laptop for various tasks (ssh, scp, ping, to reach some locally hosted website, etc. - dev stuff ...
0
votes
1answer
111 views

How do I assign a hostname to a dynamic IP address assigned by DHCP?

On my home network, the IPv4 address changes regularly, probably because when my computer got turned off, another computer was assigned to the same address so when I started my computer, there was an ...
0
votes
1answer
254 views

What to do when you can't edit /etc/hosts

I need to override DNS for a few hostnames on a Linux Centos 7 machine. I do not have write access to the file, however. What can I do in this case?
0
votes
0answers
229 views

Usage details of ahostsv4 in linux

There is a term called ahostsv4 in the Linux documentation of man getent. What is the usage of it?
0
votes
0answers
153 views

DNS adblocking ignored on connected clients with Internet access provided over WiFi in 'Client' mode

2019-04-19: I've come to the conclusion this might be some setting or bug in dnsmasq as logs shows config error is REFUSED. I will update this question at sometime in the future after I've analyzed ...
0
votes
0answers
184 views

dnsmasq has no effect on router itself

here is my resolv.conf nameserver 127.0.0.1 nameserver isp_provided Here is my dnsmasq.conf, which will do DHCP also: user=nobody bind-dynamic interface=br0 interface=ppp1* no-dhcp-interface=ppp1* ...
0
votes
1answer
171 views

connection to multiple switches from /etc/hosts and export multiple commands output to file

Actually I'm concerning how to log multiple switches listed from /etc/hosts and run on each few commands and store the output to one log file on main linux host. Second question may ask how to connect ...
0
votes
1answer
298 views

hostname -f .com.com

I modified my /etc/hostname file and /etc/hosts like that: hostname.com and 127.0.0.1 localhost.localdomain localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-...
0
votes
1answer
955 views

Browse by hostname from internet browser

I can browse my server site using ip:8080 which is inside my home network.But I am not able to browse using hostname:8080 I do not have dns server. I have edited /etc/hosts file to include ...
0
votes
1answer
2k views

Make user made entries in /etc/hosts permanent

I use Juniper Networks network connect to connect to the office network. Once i am inside the office network, i check the server ips and add entries for them in /etc/hosts file like, 10.199.xx.yy ...
0
votes
2answers
671 views

CentOS 6.5 hostname on VPS

I'm trying to change the hostname on my fresh CentOS 6.5 image (VPS) via SSH. The sources I've found all say the hostname can be permanently changed in /etc/sysconfig/network and /etc/hosts, and that ...
0
votes
1answer
702 views

Resolve Host's IP on VM

I have kind of tricky situation. I have monitoring tool where all my hosts and their VM's (with IP's and so on) are listed. But what I need is to resolve on which host(need it's ip or hostname) this ...
0
votes
0answers
68 views

VirtualHost configuration not working

I followed this article, mixed with some other research, in an effort to get VirtualHost configuration up and running on my Mac. However, for some reason when I navigate to my local.site.rocks URL it ...
-1
votes
1answer
86 views

Can browse to an app at localhost.company.com but that isn't in /etc/hosts; where else could the redirection be?

✗ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 ...