Questions tagged [hosts]

An /etc/ file that lists the hosts on a network (/etc/hosts ).

Filter by
Sorted by
Tagged with
1
vote
1answer
129 views

How to redirect a URL to another URL using /etc/hosts

I want to block some sites on my ubuntu system.So, I added some lines to the /etc/hosts, which are 127.0.1.1 www.reddit.com 127.0.1.1 www.facebook.com This now successfully blocks the ...
1
vote
0answers
54 views

WP Multi-Site Install on Ubuntu 18.04 LAMP Keeps Re-Directing URL

After a few weeks of head banging... I am very near to completing a local development environment for my WP Multi-Site Installation. The final problem that I have (wishful thinking), is that the ...
0
votes
0answers
23 views

The hosts file remains unchanged after changing the hostname [duplicate]

I have noticed that the /etc/hosts file remains unchanged after changing the hostname which leads to a failure in pinging the new hostname. It gets fixed after manually updating the hosts file and ...
0
votes
1answer
16 views

/etc/hosts block or redirect domain

I tried blocking domains like this: 127.0.0.1 https://facebook.com 127.0.0.1 https://www.facebook.com But FB open correctly. How can I block or redirect websites on this file?
0
votes
0answers
16 views

what is the Host Network Interface and how I find it

I am following some manual to set up some program in ubuntu and they ask for the "Host network interface". Now, I know the computer I am working is the Host, so what is the network interface of ...
1
vote
0answers
19 views

Unable to resolve custom hostnames in /etc/hosts [duplicate]

I'm running Apache/2.4.41 on Ubuntu 20.04. I'm trying to setup a virtual host. Neither Chrome nor Firefox are able to resolve hostnames specified in /etc/hosts file. Even before setting up the test....
0
votes
1answer
120 views

To access another user from a remote desktop while admin is logged in Linux in host machine

Suppose I am logging in as a admin and I want to login as a guest user which is present in the same machine using another remote desktop using any of the services??.I don't want shell using ssh but ...
1
vote
0answers
47 views

How to get all ip from domain name?

I use getent hosts domainname.com As a result, I get only 10 ip. I know that this domain name has a lot more ip. How to display them all? This is a VPN server. I'm just trying to create allowing ...
0
votes
0answers
41 views

How to make two hosts in same machine using nginx

Nextcloud version : 16.0.4 Operating system and version : 18.04 Apache or nginx version Nginx 1.14 PHP version : 7.2 The issue you are facing: I have a LEMP instance with ubuntu 18.04 ... My /...
0
votes
0answers
692 views

ssh-copy-id testnode fails with ERROR: ssh: Could not resolve hostname testnode: Temporarily failure in name resolution

I am not able to mention the SSH Generated Key to my test node. This is the output I get whenever I run the command ssh-copy-id: aibak@aibak-Inspiron-3542:/$ ssh-copy-id testnode /usr/bin/ssh-copy-...
1
vote
1answer
124 views

`hostname` result is different from “/etc/hostname” after upgrade

If I open a terminal windows in my graphical user interface, hostname command result is different from content of /etc/hostname: me@ZyXEL1:~$ hostname ZyXEL1 me@ZyXEL1:~$ cat /etc/hostname N4010 me@...
1
vote
1answer
323 views

Adding hosts to hostfile breaks DNS in 18.04 but didn't in 16.04

EDIT I managed to find out what I was missing that made it clear how to fix my problem. Turns out that between 16.04 and 18.04, Ubuntu and derivatives switched from something dnsmasq based to ...
3
votes
0answers
92 views

Hosts file for snap applications

I installed spotify using snap. Now I wanted to change the hosts file to block ads. I used to change the global hosts file and it worked. But then I was installing spotify from the apt repository. I ...
1
vote
1answer
636 views

virtualbox - How to make “localhost” point to the host's “localhost”?

I know I can access the host's localhost using 10.0.2.2. However, what I need is to to be able to type "localhost" in my VirtualBox Edge browser and for it to point to the localhost of my computer. I ...
15
votes
2answers
4k views

/etc/hosts not working

I populated /etc/hosts with device names and IP addresses. For example: chassisOne 10.0.0.1 chassisTwo 10.0.0.2 . . . etcetera. I am able to ping the IP address of both chassisOne and ...
0
votes
1answer
484 views

Error message while updating

I am using Kubuntu 18.04.2, I opened terminal and entered the following command to update: sudo apt update It produced the following result: [sudo] password for aayush: Hit:1 http://packages....
0
votes
1answer
244 views

Does dnscrypt-proxy's configuration replace /etc/hosts?

I've recenly installed dnscrypt-proxy. The configuration file for it at /etc/dnscrypt-proxy/dnscrypt-proxy.toml has a blacklist section I'm currently using: [blacklist] ## Path to the file of ...
1
vote
0answers
220 views

Resetting $HOST after some other command modified it

Anaconda incorrectly overwrites the $HOST variable which seems to be caused by this anaconda bug. It exports x86_64-conda_cos6-linux-gnu as the HOST. This probably occurs only when ran inside .bashrc ...
0
votes
1answer
40 views

Blocked host not fount in /etc/hosts?

I have blocked some host on my system (e.g. facebook.com) but I can not find them in the hosts file. I assume I have blocked hosts elsewhere or with some program but I do not remember where/which. I ...
3
votes
0answers
87 views

How I change hosts file only for a snap app instead of changing my system hosts file?

I see every snap app (in /snap directory) have a etc directory and some of them have a hosts file. Can I change it to prevent snap app connect to a address?
0
votes
1answer
68 views

Do I need DNS Server?

I use internet (personal connection from ISP). My operating System is Ubuntu 18.4. I am aware of /etc/hosts file, but it has limitation with wild card entries (to block websites). I wanted to know if ...
0
votes
0answers
362 views

ubuntu 18.04.2 ignoring hosts file for some domains (block ms, fb)

When configuring hosts file as such: 127.0.0.1 localhost 127.0.1.1 brad-HP-Z420-Workstation 127.0.0.1 ethical.healthcare 127.0.0.2 *.facebook.com 127.0.0.3 *.microsoft.com facebook and ...
0
votes
1answer
189 views

PC (Ubuntu 18.04.01 Server Edition) and laptop (VMware Ubuntu 18.04.01 Server Edition) linked via cable: ping works only one-way

In order to understand how to eventually make a beowulf cluster, I tried, following this reading Building a simple Beowulf cluster with Ubuntu to link my PC with Ubuntu 18.04.01 Server Edition with my ...
0
votes
1answer
1k views

/etc/hosts file wiping edits after suspending or rebooting

18.04 with latest updates. I am trying to modify my /etc/hosts file so I can access my local server via its hostname. I make the change with sudo nano /etc/hosts, and it sticks fine for the ...
6
votes
2answers
9k views

Cannot access local server with IP address while localhost and 127.0.0.1 can

I am trying to let other computers to access my local server but I tried myself locally that I cannot access it locally even myself. Several things you should know: My target Visit my server via ...
0
votes
0answers
219 views

KVM guest host communication Ubuntu virtual server

I have tried a few solutions so far but cannot get this working: I have a couple virtual servers running on my client machine. I seem to be able to connect the guests to the host or the guests to ...
1
vote
0answers
449 views

Exim: use /etc/hosts to resolve domain names

I have just installed exim4, and my /etc/hosts file looks like this: 127.0.0.1 localhost 127.0.1.1 mycomputer 192.168.100.5 rpi.mydomain.com However, when I run exim -bt john@rpi.mydomain....
-1
votes
1answer
336 views

Local domain is Pinging but not opening in the browser

I have setup local domain for example like this mydomain.test Whenever I ping this domain I receive the following 64 bytes from localhost (127.0.0.1): icmp_seq=87 ttl=64 time=0.028 ms 64 bytes from ...
2
votes
0answers
2k views

accessing localhost in virtualbox (ubuntu)

How can I access my virtual host like http://copywriters.localhost inside my Windows 10 VirtualBox? I already set this: In VM Host File: 10.0.2.2 localhost 10.0.2.2 copywriters.localhost In my ...
2
votes
1answer
617 views

Can't block YouTube using host file in Ubuntu 16.04

I followed this steps to block Facebook, Quora and YouTube. sudo cp /etc/hosts /etc/hosts.old sudo gedit /etc/hosts In the host file, I typed : 127.0.1.1 www.quora.com 127.0.1.1 www.youtube.com ...
0
votes
0answers
133 views

Remmina can't ssh to machine by hostname

I am using ubuntu 18 with remmina to manage my ssh sessions. I can connect to my machine (on local network) using: remmina with ip regular ssh with ip regular ssh with hostname When trying to ...
0
votes
2answers
1k views

ubuntu unable to resolve host

I'm working on ubuntu 14.04. I cant login to my pc as a root user.I tried different ways and i cant still the issue. If i give sudo command the response is like > ubuntu@ubuntu72:~$ sudo su sudo: ...
6
votes
1answer
259 views

Torque: Unauthorized Request

Following this guide: https://jabriffa.wordpress.com/2015/02/11/installing-torquepbs-job-scheduler-on-ubuntu-14-04-lts/ I installed TORQUE on Ubuntu 16-04-lts (he claims the process works the same ...
5
votes
3answers
7k views

Ubuntu 18.04 not recognizing hostnames from router

I previously had Xubuntu 16.04 installed, and it did recognize the hostnames set by my router (Tomato). For example, I have a computer with the name mate on the network with a static IP of 192.168.2....
1
vote
0answers
36 views

How to filter out selected records from /etc/hosts file from terminal prompts for ssh command

I have a problem with hints for the ssh command. When I press the tab key, the terminal displays all records from the /etc/host file in prompts. I use add-ons to block spam and advertisements in my ...
1
vote
1answer
3k views

/etc/hosts is ignored on 16.04 and no previous solution helps

Entries in my /etc/hosts file are being ignored: $ cat /etc/hosts 127.0.0.1 localhost 127.0.0.1 google.com $ ping google.com PING google.com (216.58.213.142) 56(84) bytes of data. 64 bytes from ...
1
vote
0answers
406 views

Ubuntu 17.10 - Nginx Hosts not working

I'm using Ubuntu 17.10 and have installed nginx. I already made the change on php.ini cgi.path_info=0 and have added this on etc/hosts 127.0.0.1 test.app Then I saved and restarted nginx, but when ...
1
vote
0answers
701 views

/etc/hosts changes ignored

I want to add entries to my hosts file so I can access some local vagrant VMs for development. I have a near-new install of Ubuntu 16.04 LTS. There is a /etc/hosts file but changes I make to it are ...
2
votes
1answer
541 views

Unable to block Linkedin.com

I needed a break from wasting time on LinkedIn and Twitter, so Iappended following to /etc/hosts file on Ubuntu 16.04: 127.0.0.1 twitter.com 127.0.0.1 linkedin.com This blocked Twitter but not ...
3
votes
1answer
11k views

Missing /etc/hosts file – How can I create a new hosts file? [duplicate]

I have googled and searched Ask Ubuntu on this, but got no relevant answers. I have no hosts file in /etc, I cannot find a hosts file in search, I am talking about the system hosts file not lampp/etc. ...
-1
votes
1answer
423 views

in a server ubuntu 16.04 pointing all sub-domain to domain

site1.conf enter image description here all domain point to one site ServerName dev.site1.com DocumentRoot /var/www/html/site1 site2.conf ServerName dev.site2.com DocumentRoot /var/...
2
votes
1answer
1k views

Firefox is Ignoring Ubutnu hosts File

I am running Ubuntu 16.04 and I am using HTTP proxy to connect to the INTERNET in my university. I have edited my hosts file as below 127.0.0.1 localhost 127.0.1.1 user-PE62-7RD 10.105.8....
0
votes
1answer
530 views

Editing /etc/hosts causes Apache server block to be missed

In order to fix some email (SPF) issues, I changed my Ubuntu VPS hostname to its FQDN in /etc/hosts and /etc/hostname. However, now, when I hit the URL in a browser I get a 404 from Apache instead of ...
0
votes
1answer
4k views

Is it possible to use multiple IP addresses for the same host name in a linux hosts file?

The scenario is I have a machine that can be accessed both locally (when I am in the same network as the machine) and publicly (when I am on any external network). I want my hosts file to look ...
0
votes
1answer
605 views

How to change Host (IP address) and port number to connect to wifi internet in Xubuntu 16.04?

I explain my situation: I downloaded from google play store NetShare app to make my smartphone as WiFi extender, it works with no problems, BUT I need to change the host name (IP address) and port ...
0
votes
0answers
2k views

Blocking youtube on Ubuntu using etc/hosts [duplicate]

I want to block Youtube using the hosts file. I managed to do this with Facebook and Instagram but with Youtube it is not working. Here is my hosts file: 127.0.0.1 localhost 127.0.1.1 goncalo-...
1
vote
1answer
46 views

Forward a certain website to a different IP locally

So what I'm trying to do, is when someone wants to visit a site like www.illegalsite.com I want it to redirect back to google, or a set IP address. I dont have a DNS server or anything. Adding ...
0
votes
1answer
544 views

How to insert a DNS into /etc/hosts through a bash script?

I have a bash script runmydocker.sh that should grab the DNS string sent by the developer, when running he runmydocker.sh and create a new DNS inside the /etc/hosts dynamically and point to the docker ...
1
vote
1answer
66 views

How to access cloud host by secondary IP? [closed]

Version of Ubuntu is 14.04 and host provider 1and1.com. I have configured the host with two public IPs and following is the configuration of my /etc/network/interfaces file: # This file describes the ...
2
votes
2answers
2k views

Google Cloud Compute keeps changing my /etc/hosts file after restart

I have been playing around with 3 google cloud compute instances using webmin/virtualmin (web hosting and email), Vestacp (hosting only), and ISPconfig (hosting only) control panels. The ISPConfig ...