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

learn more… | top users | synonyms

24
votes
3answers
51k 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 ...
14
votes
0answers
16k views

sudo: unable to resolve host (name already added to /etc/hosts) [duplicate]

Whenever I use sudo, I get this: sudo: unable to resolve host dave00-G31M-ES2L Here is my /etc/hosts: dave00@dave00-G31M-ES2L:~$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 dave00-G31M-ES2 # ...
8
votes
3answers
33k views

How to edit hosts.deny and hosts.allow?

I want to block some hosts in Ubuntu, so how could I edit hosts.deny file to block some hosts like example.com. And one more thing I have installed dnsmasq in Ubuntu, so can I check the entries of ...
8
votes
1answer
15k views

Why does my name resolution hit the DNS even with a hosts file entry?

I'm running Ubuntu 10.04.2 LTS Desktop. Being a web developer, naturally I created a "me.com" in my /etc/hosts file. Unfortunately, my name resolution is going out to the DNS before first checking my ...
8
votes
2answers
6k views

How do I properly set up and secure a production LAMP Server?

It's very hard to find comprehensive information on this subject. Either I found short tutorials on how you perform the installation, as simple as "apt-get install apache2", or outdated tutorials. So ...
7
votes
6answers
16k 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 ...
7
votes
4answers
1k views

Is there a GUI for /etc/hosts that I can use?

I want to be able to easily and frequently edit my hosts file from a quick GUI. Any one know of one that exists? Thanks!
6
votes
4answers
13k 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: ...
6
votes
1answer
3k views

Default permission of hosts file

I changed the permissions of my host file /etc/hosts by doing a chmod og+w. What's the default permission so that I can switch it back?
6
votes
1answer
1k views

network monitor widget

Is there a widget that shows all current hosts (IP adresses) in a list? I am not talking about a network bandwidth meter widget.
5
votes
1answer
2k views

Is it possible for /etc/hosts to include a file from my home directory?

I would like to setup Ubuntu One to sync a hosts file in my home directory between my machines. Ideally I would setup all my local web development URLs there and it would just sync between devices. ...
5
votes
1answer
135 views

Preventing Users/Groups from accessing certain Domains

I have created a Study account which I use when doing anything school related work. It's purpose is to remove the distractions of my normal account, such as social media and news websites. I know ...
5
votes
1answer
415 views

How would I broadcast a subdomain/virtual name on a local server with people connected to the same network

I have a server connected to the router which has ubuntu 12.04. It is has apache/mysql/php all installed ready to go. the folder structure is like this: /var/www -- this isnt the root -/libs -/logs ...
4
votes
2answers
13k views

editing apache vhosts and ubuntu hosts file?

I have just installed ubuntu (11.04). I have installed apache/mysql/php etc. I have a few sites sitting in /var/www/site1 /var/www/site2 /var/www/site3 I want to be able to access these at ...
4
votes
1answer
2k views

How can I keep my custom entry in /etc/hosts?

Since I upgraded my laptop to Ubuntu 11.10 32-bit, the entry I add to /etc/hosts for my home server keeps disappearing on boot. I have to edit the hosts file every time I start up and want to access ...
4
votes
2answers
294 views

How can I prevent Desktop Users from accessing any online website?

How can I prevent Desktop Users from accessing any online website? I tried 127.0.0.1 * in /etc/hosts but it didn't do the trick. Please note that I need to keep http://localhost fully functional. ...
4
votes
1answer
127 views

Why is this single-word address being resolved? [closed]

I'm running Ubuntu 12.04. On my work network, there's a single-word address (let's call it foobar) that is responding to pings and HTTP requests, only from my machine. The address is not a TLD, just a ...
3
votes
3answers
4k 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
5answers
7k views

How to SCP a file from Mac -> Ubuntu VirtualBox?

I have a Mac (OS X) and a VirtualBox running Ubuntu. I want to SCP a 500mb file from the Mac to the VirtualBox. How do I do this? (Probably something to do with /etc/hosts?)
3
votes
1answer
5k views

Rename computer in Ubuntu 13.04

How can I rename my computer? Renaming it in /etc/hosts and /etc/hostname does something weird. Before renaming it, I am able to open these files via sublime using sudo subl /etc/hosts but when I ...
3
votes
1answer
6k views

/etc/hosts file not being used before DNS server query

I have upgraded to Ubuntu 12.10 and I have made entries in /etc/hosts, but instead of looking into the hosts file, queries to my configured DNS server are being made first. How can I make Ubuntu ...
3
votes
1answer
8k views

SSH: How to handle missing: /home/USER/.ssh/known_hosts [closed]

I have a old laptop that I'm using to learn Ubuntu Server 12.10. Prior to reformatting and installing Ubuntu Server, Ubuntu Desktop was used. With Ubuntu Desktop, I was using a no-ip.com hosted ...
2
votes
4answers
1k views

“Lock” one specific file so that I nor root no longer have access to it any more

To combat procrastination, I edit my /etc/hosts file by adding time-wasting websites and pointing them to localhost. However, the flesh is weak and I often find myself reverting my changes. I was ...
2
votes
2answers
7k views

Network configuration: resolv.conf and hosts

I read This manual and I'm a little confused. This is what I don't undetstand: When your system tries to resolve a hostname to an IP address or determine the ostname for an IP address, it refers to ...
2
votes
2answers
145 views

hosts file and unclear behavior. How to make real alias?

I'm trying to create alias for my local website which is runned by vagrant(virtual box), hence I want redirect any requests from site.ru to 192.168.10.10/site.ru via /etc/hosts file. In the hosts file ...
2
votes
4answers
5k views

What would cause 'ping localhost' to fail?

the /etc/hosts file contains a line: 127.0.0.1 localhost so localhost should be a valid hostname, but any attempt to connect to a port on localhost fails, including ping. Connection attempts into ...
2
votes
2answers
6k views

Configure hosts file to use aliases

I am running Ubuntu Desktop 12.04 and would like to be able to open a web browser (Firefox), type an alias into the address bar, hit enter, and have the browser take me to the site that the alias ...
2
votes
1answer
793 views

Domain name isn't assigned from DHCP when booting from Live CD

I downloaded the ubuntu 10.10 ISO image for AMD64. When i start the ISO ubuntu gets an IP address from my DHCP server. NetworkManager updates /etc/resolv.conf according to the DNS config provided by ...
2
votes
1answer
5k 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 ...
2
votes
0answers
34 views

Getting Ubuntu server to resolv new IP for a host name

I run a minecraft server on ubuntu 14.04 LTS on vm's using virtual box. In order for players to connect, their 'account' must be checked with Mojang, at sessionserver.mojang.com. The problem is, the ...
2
votes
0answers
2k 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
0answers
3k views

Keep getting “sudo: unable to resolve host” [duplicate]

Everytime I type in sudo it says that after it. I tried following others instructions, but it says bash: /etc/host: permission denied.
1
vote
1answer
412 views

can't /etc/hosts be set up automatically?

what I need is: automatically add mac-addresses to some file and manually add the hostnames assigned to them, and a script will then scan my home LAN for those mac-addresses and populate the ...
1
vote
1answer
4k 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 ...
1
vote
1answer
10k 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 ...
1
vote
1answer
57 views

How can I get the Default files .. Networks / Hosts / resolve / and whatever else I changed to try and get up my webserver?

Does anyone have the original.. Default Hosts File, Resolve File.. and networks file? Please someone help me get these back to normal so I can put up a web-server. I'm tired, just to set up a ...
1
vote
1answer
72 views

Hosts file changes not showing their effect, other options?

Hosts file changes not showing their effect. I need to add a domain name alias to my localhost address so that when I type "myfictiousdomainname.com" it should request localhost:8084 address on my ...
1
vote
1answer
514 views

Can't resolve local hosts

To start with, my Linux or networking knowledge is fairly basic, so it's probably best to assume that I know nothing. I've been trying (for my own furtherance) to put together some sort of home ...
1
vote
1answer
67 views

Hosted website unavailable after uninstalling local copy

I attempted to install my hosted Wordpress site on my 12.04 desktop following the Ubuntu Lamp guide, then after being unable to get it running properly attempted to uninstall it using suggestions in ...
1
vote
1answer
108 views

Change Hosts 1.1.0 not working

I installed this addon Change Hosts 1.1.0 in firefox, and saved my preferences for hosts file in it. But when i select any host configuration from the addon it throws an error citing unable to save ...
1
vote
1answer
28 views

Would there be a problem if I set 2 hostnames in my server?

Would there be a problem if I set 2 hostnames in my server? vi /etc/hostname dns01.hello.com proxy01.hello.com and in my hosts file 127.0.0.1 localhost 127.0.1.1 dns01.hello.com 127.0.1.1 ...
1
vote
0answers
85 views

Localhost port aliased

I wanted to use /etc/hosts to define "aliases" for multiple services localhosted like: 127.0.0.1 localhost 127.0.0.1:8080 machin 127.0.0.1:8081 truc But it doesn't seem to work, surely because ...
1
vote
1answer
183 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 ...
1
vote
0answers
178 views

How do I block an IP using hosts.deny with a non-default program?

I'm new to all of this. I'm running Ubuntu 12.10 x64. I recently wrote a program in C++ that accepts TCP connections on port 57370, and it is running as a daemon (I used this guide). It's not very ...
1
vote
0answers
234 views

Can I set up a hostname alias that is only active in a specific network?

I have a small ARM box running ownCloud in my house, and a domain bound to my DSL router with Dynamic DNS. This works well as I can configure the ownCloud client to use the domain name, which works ...
1
vote
0answers
166 views

Problem Raised after changing the system hostname

I have changed the hostname of my computer from dar to hus by editing the /etc/hosts file and /etc/hostname file. Now the problem is that some software which were installed under 'dar' are not ...
0
votes
2answers
195 views

I messed up my /etc/hosts and /etc/resolv.conf files, now my network doesn't work. How can I reset it?

I tweaked my system by installing ftp server and a dns server. I think in the process I messed up resolv.conf and the hosts file. Now I want to restore it but am not able to do so. I am using ...
0
votes
1answer
99 views

Modify Hosts File [closed]

Has anyone used this method: http://www.putorius.net/2012/01/block-unwanted-advertisements-on.html I tried per instructions. Maybe I'm too new to Linux, it's not working for me. While looking for ...
0
votes
4answers
1k views

why is chrome resolving domain names differently than ping which is resolving differently than ssh?

When I go to me.com in chrome it tells me that domain can't be found. When I go to me.com with ssh, it connects to that server. When I try to ping me.com it pings localhost. I want me.com to ...
0
votes
1answer
89 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 ...