Questions tagged [hosts]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
42 views

How to prevent my computer from connecting to a specific site [duplicate]

I recently decided to make the switch to Ubuntu. And I had a question pertaining to site connections. Before beginning, I need to give some context. I am/was addicted to youtube. I think at my peak in ...
user avatar
0 votes
0 answers
36 views

How to make KVM guest forget IP address deleted from /etc/hosts?

In my workstation I run a KVM hypervisor containing: a guest VM running Xubuntu as my developer environment. a guest VM running Ubuntu server as my development target. I set the IP address of the ...
user avatar
2 votes
1 answer
1k views

`sudo visudo /etc/hosts` gives syntax errors

Really dumb question, Ubuntu 20, and I have apache2 installed, not much else. I go sudo visudo /etc/hosts and want to add an alias "dummy.com" domain alias as a hack to point to the server ...
user avatar
  • 167
0 votes
0 answers
35 views

Block domain and all of its paths, except for some

Let's say I want to block access to ALL of reddit.com, except for www.reddit.com/r/memes (and its sub paths) and www.reddit.com/r/AskReddit (and its sub paths). This example could apply to any site ...
user avatar
1 vote
1 answer
38 views

"mate-network-properties" won't honor ignored-hosts address

I want to block a social media address. When I block it via echo "127.0.0.1 facebook.com" | sudo tee -a /etc/hosts > /dev/null works. But when I use mate-network-properties gui and ...
user avatar
  • 4,854
0 votes
1 answer
56 views

Host name access not working

Ubuntu Server 20.04.3 LTS Linux 5.4.0-88-generic Hostname : plexserv All was working fine, Plex and Samba set up, could access files on the server from Windows and MacOS machine no problem. Then I ran ...
user avatar
0 votes
1 answer
92 views

how to activate a new /etc/hosts instantly

I'm using a terminal command to replace the /etc/hosts - file. alias nonews="sudo -S chattr -i /etc/hosts < /etc/password_file && sudo -S cp /etc/hosts_all_blocked /etc/hosts < /etc/...
user avatar
  • 171
0 votes
1 answer
240 views

Adding block list to hosts file

Ubuntu 21.04. Linux newbie here. For a few months I’ve been thinking about setting up a pi-hole to block ads. But a few days ago I read about just adding a block list to the hosts file. I wasn’t aware ...
user avatar
0 votes
1 answer
1k views

How do I edit hosts files? Lubuntu 20.04

Normally I get a access denied even after I change it's permission to 777. I see many solutions Use gedit, dunno how to get use or find whatever that is. Other solutions use the terminal sudo -i gedit ...
user avatar
0 votes
1 answer
432 views

hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname

Aloha, i'm on Ubuntu 18.04 and i recently executed a deadly git clean command that was meant to clean the Hard Drive Cache and that whipped out nearly every thing on my hard disc. Now i can't license ...
user avatar
0 votes
1 answer
246 views

Two VirtualHost websites do not work together under Apache 2.4

I'm running Apache 2.4 under Ubuntu 18.04 I'm having this problem where all addresses I type onto the browser bar get redirected to one of the two websites I have configured (in this case, whenever I ...
user avatar
  • 479
2 votes
1 answer
1k views

Not Found The requested URL was not found on this server

This is how my virtual hosts the-square.local.conf looks: <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port t> # the server uses to identify itself. ...
user avatar
1 vote
0 answers
291 views

How to resolve captchas whilst blocking google.com on Ubuntu 20.04?

Question How could one solve captchas, such as those shown by zoom when one would like to join a meeting from the browser, whilst blocking access to www.google.com (search queries) on Ubuntu 20.04? ...
user avatar
  • 195
0 votes
1 answer
83 views

Advance working of /etc/hosts file in ubuntu

I have a Java application which is distributed and having a network connection with a NFS share. The application is using DNS to connected to network share. We wanted to test a network connection ...
user avatar
0 votes
2 answers
423 views

Deny smtp connection from unknown and unverified hosts with hosts.deny

I need to reject all smtp connections whose host name is unknown or does not match its address. Have tried setting in hosts.deny: smtpd: UNKNOWN smtpd: PARANOID but Postfix logs show that they are ...
user avatar
  • 121
1 vote
0 answers
510 views

Nmap keeping crashing and popping up the "System Program problem detected", should I worry?

$ sudo nmap -vv -P -T1 192.168.0.1/24 Output: >Warning: The -P option is deprecated. Please use -PE >Starting Nmap 7.80 ( https://nmap.org ) at 2021-01-01 18:29 -03 >Initiating ARP Ping Scan ...
user avatar
1 vote
1 answer
332 views

How to route DNS resolver to a different DNS based on the URL hostname?

This is why I would like to do: Most hostnames -> Resolved by DNS1. Some hostnames -> Resolved by DNS2 (I don't know IP addresses just the hostname). It should look as creating a whitelist/...
user avatar
1 vote
0 answers
723 views

Blocking hostname and subdomains in hosts file

I have recently started using /etc/hosts to block distracting websites. For specific domains that works nicely, but is there any way to match a domain and all of its subdomains? So, this blocks ...
user avatar
  • 292
0 votes
1 answer
697 views

Firefox uses remote name lookup before /etc/hosts

I have added the following line to my /etc/hosts file on Ubuntu: 192.168.0.104 www.tondering.dk www.xzutsfsdet.com 192.168.0.104 is an IP address on my LAN. www.tondering.dk is a server that exists ...
user avatar
  • 902
0 votes
1 answer
29 views

Is it possible to create a rule for etc hosts (Rule: 10.0.0.* ip. Usage: ping ip.10)?

If I have multiple hosts I want to add aliases for, e.g. 10.0.0.10 ip_10 10.0.0.11 ip_11 10.0.0.12 ip_12 Is there a way to have a group these into one line? I tried 10.0.0. ip and then tried to ping ...
user avatar
4 votes
1 answer
7k 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 ...
user avatar
  • 1,236
1 vote
0 answers
76 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 ...
user avatar
0 votes
1 answer
520 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?
user avatar
1 vote
0 answers
20 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....
user avatar
  • 11
0 votes
1 answer
751 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 ...
user avatar
1 vote
0 answers
67 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 ...
user avatar
  • 21
0 votes
0 answers
3k 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-...
user avatar
  • 1
1 vote
1 answer
976 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@...
user avatar
  • 2,528
1 vote
1 answer
1k 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 ...
user avatar
4 votes
0 answers
237 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 ...
user avatar
  • 53
2 votes
2 answers
2k 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 ...
user avatar
16 votes
2 answers
7k 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 ...
user avatar
0 votes
1 answer
508 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....
user avatar
1 vote
1 answer
791 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 ...
user avatar
  • 73
1 vote
0 answers
712 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 ...
user avatar
0 votes
1 answer
66 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 ...
user avatar
4 votes
0 answers
194 views

How do 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 an address?
user avatar
0 votes
1 answer
83 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 ...
user avatar
  • 487
0 votes
0 answers
547 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 ...
user avatar
0 votes
1 answer
254 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 ...
user avatar
1 vote
1 answer
5k 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 ...
user avatar
  • 193
9 votes
2 answers
22k 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 ...
user avatar
  • 233
0 votes
0 answers
449 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 ...
user avatar
1 vote
0 answers
836 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....
user avatar
  • 425
-1 votes
1 answer
811 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 ...
user avatar
3 votes
0 answers
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 ...
user avatar
3 votes
1 answer
1k 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 ...
user avatar
  • 161
0 votes
0 answers
343 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 ...
user avatar
0 votes
2 answers
2k 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: ...
user avatar
6 votes
1 answer
421 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 ...
user avatar