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

learn more… | top users | synonyms

3
votes
3answers
3k views

After modifying /etc/hosts which service is needed to be restarted in ubuntu

After modifying "/etc/hosts" which service is needed to be restarted in ubuntu !
3
votes
1answer
20 views

Can I create an internet whitelist using only the packages availible on a clean Ubuntu install? (maybe /etc/hosts.allow?)

I want to not be able to go to any site unless it's on a whitelist, and I'd rather not use something like Privoxy, can I do that with Ubuntu? I'm thinking that perhaps I can use /etc/hosts, /etc/...
2
votes
1answer
4k views

Apache - server not resolving by /etc/hosts if I have not internet connection

I have configured many virtualhosts in my current apache2 server, in my local machine (Ubuntu 13.10). Those are different local sites, with domains which are set in my /etc/hosts: 127.0.0.1 ...
0
votes
1answer
34 views

How to get Hosts file modifications to survive reboot?

I'm running a live distro of Lubuntu (from USB). Everyday I try modifying the /etc/hosts file with a slew of new entries and it survives the session. When I reboot the following day, the entries are ...
0
votes
0answers
9 views

how to deny hosts to apache2..?

regarding a specific answer for how to deny access for the outer world to my apache2 webserver. ssh should be allowed and my official network should be able to access the web sites but no access from ...
0
votes
0answers
14 views

How to deny outer world from accessing the webserver?

I have a Wordpress Server hosted on Apache2 in my official network. I don't want this site to be accessible to the outer world. This should only be accessible in my office network. What can be done on ...
1
vote
2answers
53 views

Unable to SSH to a host within my home LAN by using the hostname or local IP address

I want to access the SSH server on a Raspberry Pi (with Raspbian OS) from an SSH client on a X86_64 computer with Ubuntu 14.04, both located inside the same home LAN. I am able to SSH from the ...
0
votes
0answers
18 views

I want to include common host entries in different environment specific host file

I have 4 sets files hosts file live host file hosts-live pre production host file hosts-prepord staging host file hosts-staging pre production client test host file hosts-prepord_client I have an ...
-1
votes
1answer
59 views

How to add entry to /etc/hosts with a built-in command line

It turns out that editing /etc/hosts is enough to add an entry of DNS. Is there a built-in cmd , where we can: add host cmd: $ sudo mycmd 10.103.23.34 myme.com Result : 10.103.23.34 ...
2
votes
2answers
9k views

'/etc/hosts' , http links are redirecting, but https links are not redirecting

I edited /etc/hosts file and entered below information : 127.0.0.1 test.com //working 127.0.0.1 https://test.com //not working . from the above info, http://test.com is redirecting to 127....
0
votes
0answers
24 views

Why do my development websites in /var/www not load?

I configured an apache2 server on a virtualbox with ubuntu. This always worked but since yesterday my websites suddenly won't load annymore. I think it has something to do with our new network router ...
0
votes
1answer
74 views

How to unblock website in Ubuntu

I have blocked youtube.com website using gedit /etc/hosts file. Then I have removed the entries in hosts file. Even though the websites are blocked permanently. How to unblock the youtube again.
0
votes
0answers
25 views

redirect site behind load balancer

I have tried changing the /etc/hosts file to redirect the site to a specific server behind the load balancer. x.x.x.x sitename.com The sitename.com page is served by that specific server x.x.x.x ...
0
votes
1answer
137 views

How to add 0.0.0.0 in hosts file before every domain in gedit?

When I add 0.0.0.0 i do it manually and it takes long time, how to apply in one step. for example i want block admedia.com and subdomains , i open terminal and type sudo gedit /etc/hosts, and put ...
1
vote
1answer
77 views

Format of ipv6 address in hosts.allow for sshd

I'm trying to allow access to a user via ssh who has an IPv6 address. I want to assign the address in the hosts.allow file I have other users with IPv4 addresses working fine but it seems I have a ...
0
votes
1answer
107 views

Use /etc/hosts to direct wildcard domain name

I searched this term and didn't find my answer: "wildcard domain name in hosts" I have a HostGator account where I create secret domains so I can build and test websites. In order to use them, I add ...
0
votes
0answers
115 views

getent hosts ipv6 vs ipv4

I have an Ubuntu System with IPv6 disabled. Somehow getent hosts returns a list of IPv4 adresses, but if I query for a specific host I get an IPv6 address: root@pc170:~ % cat /proc/sys/net/ipv6/conf/...
22
votes
9answers
43k views

Why is the /etc/hosts file not working?

I have been having problems with this for a while and have tried everything I know, so I figured it was finally time to ask for some help. Any edit I make to /etc/hosts just doesn't work. Example: ...
0
votes
0answers
69 views

Ubuntu 14.04, /etc/hosts file entries not working and referring to wrong ip

I am on Ubuntu 14.04 LTS, I have added few host machines to the file /etc/hosts as below: 192.168.2.12 machine1 192.168.2.13 machine2 192.168.2.14 machine3 These machines are in the same network ...
9
votes
5answers
543 views

Permanently store addresses when using SSH

I have a few remote servers which I connect to through the terminal. The servers don't have a domain, only an IP address which is hard to remember when I got a few of them. Is there a way to ...
1
vote
1answer
660 views

Can /etc/hosts be set up automatically?

I need to automatically add mac-addresses to some file and manually add the hostnames assigned to them. A script will then scan my home LAN for those mac-addresses and populate the /etc/hosts file, ...
1
vote
0answers
194 views

What should be /etc/hosts entry so that it works fine for both localhost & IP address?

Sample etc/hosts: 127.0.0.1 localhost 127.0.0.1 DEVubuntu 192.xxx.xxx.xxx DEVubuntu This is not working for me. I am not able to run Zookeeper and I am sure it's related to the ...
1
vote
0answers
36 views

Resolve domain names to IP's based on physical adapter

System Configuration eth0 NIC to the LAN/WAN/Internet (working, don't want to mess with it) eth1 NIC eth2 NIC Objectives Assign a static IP to eth1 and eth2 and assign IPs (DHCP) on separate ...
0
votes
1answer
487 views

Correct MX record, subdomain and Dynamic DNS settings for Namecheap Self hosted email @domain.com email & correct Hosts and Hostname for server

I want to correctly Set up my own email server at home for my domain.com. It is hosted by namecheap. I need to set up the following On Namecheap (Domain provider): MX Record Subdomain On Server: ...
2
votes
1answer
555 views

is there a hostsman like app for Ubuntu

One way to keep malware and advertisements outside the door is by blocking the computers that serve this content.... - tweakers.net tweakers.net(Dutch) was talking about hostsman, according to ...
0
votes
1answer
32 views

Ubuntu host/client server for backups?

Im not sure if this has been asked, I couldn't find it if it has been. Im wanting to use a ubuntu server to host a backup service of some kind to back up customer files that are located on windows ...
3
votes
1answer
7k views

Blocking multiple sites with /etc/hosts

By editing the hosts file and adding: 0.0.0.0 sitetoblock.com I can block that particular website. Using the hosts file, is it possible to block every website except a few sites I specify? Wikipedia ...
0
votes
0answers
25 views

having difficulty editing /etc/hosts

I'm trying to accomplish two things, the first was to disable the ability for two card catalogs which are supplied by DHCP and AD integrated DNS to get to google.com, I have finally accomplished this ...
1
vote
1answer
190 views

Advanced rules for hosts file

I need to add a rule for all subdomains of a domain. I imagine it should looks like this: 127.0.0.1 *.example.com As you can see, I need to redirect all requests to any subdomain on example.com to ...
0
votes
1answer
36 views

Unknown host and not sudo anymore [duplicate]

I have had ubuntu for a while now, but for some reason I am no longer a sudo. When I open up terminal and type the command sudo false sudo unknown host HOST then when I actually look at my hosts ...
1
vote
0answers
28 views

How to block certain folders in local web server excluding the root folder

I am already using the hosts file to block unwanted websites like 127.0.0.1 google.com . How can I block local users to access http://mylocal.loc/private but still want to access other folders like ...
0
votes
0answers
123 views

Ubuntu 14.04 taking too much time to resolve a Host

I have a ubuntu 14.04 machine, Everything was working perfectly sometime before. but then just one day this problem started. when i try to load a page on chrome it keeps saying "resolving host" and ...
0
votes
1answer
217 views

How to diagnose /etc/hosts file having no effect

Right now, on my Ubuntu 14.04 desktop, for testing purposes I've changed the /etc/hosts file to something very simple: 127.0.0.1 localhost 127.0.0.1 something However, this simple configuration ...
0
votes
0answers
175 views

Should Mailserver /etc/Hosts be static ip or loopback?

Im trying to set up a mail server, and currently I am having issues with hostname and hosts files. I want to get this correct before installing postfix and trouble-shooting issues that may be non-...
1
vote
1answer
428 views

localhost is wrong ip address

I'm having a bizarre problem. It started with postgresql-9.3 not installing. I found it couldn't find localhost. I checked /etc/hosts and it has localhost properly as 127.0.0.1 But when I ping ...
5
votes
2answers
21k views

ubuntu server not resolving LAN hostnames

Bit stuck here. I have 2 machines that cannot resolve LAN hostsnames, unless there are specific entries in /etc/hosts But other machines on the LAN can resolves hostnames. My LAN: 1 x Cisco ...
5
votes
1answer
3k views

VirtualHost In Localhost Is Not Accessible From Localhost When Offline, How To Fix It?

I am setting up my own local development web server, mainly for theme development. I've successfully setup LAMP in Ubuntu 13.04 64bit Desktop, apache works fine. The machine where LAMP is installed ...
2
votes
1answer
4k views

Why is my /etc/hosts file not queried when nslookup tries to resolve an address?

I have a couple of local domains resolved to 127.0.0.1 in my /etc/hosts file. And it was all alright for a period of time but now when I run: nslookup test.local It results in: Server: 192.168....
9
votes
7answers
24k views

/etc/hosts modification does not work properly. What to do?

I have added these lines to the hosts file: 127.0.0.1 localhost adobe.com 127.0.0.1 adobe.com It works perfectly on windows. But in Ubuntu 11.10 when I try to access it using Firefox the website ...
0
votes
1answer
147 views

How to setup /etc/host in Ubuntu to have ip 192.168.X.X

im using Ubuntu 14.4. my Ubuntu server IP is 10.20.0.25 how to setup my server to have ip 192.168.X.X when other device want to communicate with the server. Below is my configuration. please advice ...
1
vote
2answers
221 views

Slow sudo and ssmtp (hosts file problem)

I'm running an Ubuntu Server 12.04.5 LTS and when I type sudo su it takes 30+ seconds to open the shell. Searching on internet, this problem seems related to the file /etc/hosts and /etc/hostname. ...
8
votes
3answers
7k views

how to block specific domains in hosts file?

I know hot to block single tumblr blog with 127.0.1.1 something.tumblr.com but I want to block entire tumblr. I tried 127.0.1.1 tumblr.com but it's not working. Is there a way to do this?
3
votes
1answer
6k views

unable to edit /etc/hosts file in ubuntu 14.10

I changed the hostname from default name, set during installation to something short and nice, but didn't change it in /etc/hosts file. /etc/hostname is changed after restart but sudo is not working. ...
26
votes
3answers
64k views

Changing System name [duplicate]

I am given an old Ubuntu working system and the previous user had everything on his name so started turning it to my name as typing his name everywhere was bugging me. I tried: $ usermod -l hussain ...
2
votes
1answer
269 views

Hosts file change syntax

I am attempting to migrate a website to a ubuntu server but would like to test it first On windows I have changed my host file to point to the server, so the browser is opening the "new" site. In my ...
2
votes
1answer
12k views

curl --resolve option not working: “Hostname was NOT found in DNS cache”

I am attempting to use curl's --resolve option to connect to the specified IP address when performing the HTTP request, but curl keeps reverting back to the IP address as retrieved by my local DNS ...
1
vote
0answers
641 views

Configuring /etc/hosts file

I am running 14.04 x64 vmlinuz-3.13.0-43-generic and I face a problem after updating /etc/hosts file. Here is the content of the file: # Your system has configured 'manage_etc_hosts' as True. # ...
0
votes
2answers
432 views

After change of host and hostname, terminal won't show it

I have changed my host and hostname by editing the files /etc/hosts and /etc/hostname. But this won't affect what appears as my terminal prompt. It still shows my old_host@new_hostname. How to get ...
0
votes
1answer
174 views

Will Editing HOSTS file in Ubuntu Improve my Network Security?

I have recently learnt about 2 different ways of editing the hosts file in Ubuntu for the purpose of blocking webpages and domains tracking my computer (protecting myself from tracking cookies), and I ...
-1
votes
2answers
2k views

How to enable YouTube which is banned on a system

I have YouTube banned in my system. How can I enable it? I tried to lookup for it in /etc/hosts.deny file but couldn't locate it. Looking for an Ubuntu specific solution, how to disable/enable it? ...