Questions tagged [hosts-file]

Hosts file is an OS file to map hostnames to IP addresses.

Hosts file is an operating system file that maps hostnames to IP addresses. It is a plain text file. In modern operating systems, the hosts file remains an alternative name resolution mechanism, configurable often as part of facilities such as the Name Service Switch as either the primary method or as a fallback method.

150 questions
5
votes
9 answers

Block users from Social networking websites while firewall is down

We currently have a SonicWall firewall, which does a pretty good job a blocking Social networking websites like Facebook and Bebo. The problem we are having is that sometimes we need to temporarily disable our firewall blocklist so we can update our…
SuperFurryToad
  • 195
  • 1
  • 9
4
votes
3 answers

Deny requests for other domains in Apache 2

Let's say I have xy.com running on a server powered by Apache. It's the default virtual host. Now someone has rewritten his hosts file to redirect yz.com to my server's IP. As my server doesn't know a thing about yz.com, it just resolves it to the…
Rickye
  • 141
  • 1
  • 3
4
votes
2 answers

make dnsmasq ignore specific entries in /etc/hosts

I've set up a machine running dnsmasq, essentially serving its /etc/hosts file. However, there are specific entries which I want in that machine's /etc/hosts, but I don't want served. How can I make dnsmasq not serve them?
einpoklum
  • 1,622
  • 3
  • 19
  • 30
4
votes
2 answers

Deploy hosts file among machines connected to a domain

I want to copy a new hosts file (and delete the old one) among Windows 7 users connected to one domain. Many of my users work remotely. Could anyone advise me the best way to deploy that file with minmal fuss (ideally, I do not want the users to do…
Regmi
  • 207
  • 2
  • 4
  • 12
4
votes
4 answers

change ip to dns in /etc/hosts on Ubuntu 11.04

in ubuntu 11.04, i'm trying to change dns to force it to point to another server let's assume the domain name is www.mysite.com and the ip 96.32.66.xx i changed /etc/hosts but when i open the browser it dosen't work. if i ping 96.32.66.xxx it…
Michele
  • 169
  • 10
4
votes
3 answers

How can I have a user specific hosts file

Is it possible to configure user specific hosts file instead of a common /etc/hosts. For example if user "user1" tries to get the name for the IP: "127.0.0.1", he gets "dev.user1" and if user "user2" tries to get the name for the same IP, he gets…
Supratik
  • 2,104
  • 10
  • 49
  • 66
4
votes
5 answers

Why is my hosts file not working?

I've been using the hosts file to for local website development, and it's recently stopped working. No entries other than localhost resolve. I've simplified to test, so it now contains only 127.0.0.1 localhost ::1 localhost 127.0.0.1 …
e100
  • 233
  • 1
  • 4
  • 10
3
votes
2 answers

Windows Server 2012 R2 curious behavior with hosts entry

TL;DR ...our domain policy silently force pushed the LAN settings (including the proxy reference) to my machine on a predefined interval, which happened to be while I was developing but after I had manually disabled the proxy. Since I knew for a…
K. Alan Bates
  • 223
  • 2
  • 12
3
votes
1 answer

Avoid a faulty server behind load balancer

Environment We have a solution running that interacts with the Twitter API. The Twitter API endpoint is: api.twitter.com We make many calls to the endpoint but we are hitting very rarely any API Limits defined by Twitter. I presume that Twitter…
Segers-Ian
  • 133
  • 5
3
votes
1 answer

Relation between server_name in nginx sites-available, /etc/hosts file and A-records

I have the following two server-blocks in my config-file in sites-available: server { listen 80; server_name www.mydomain.be; root /usr/share/nginx/html; index index.html index.htm; location / { …
Patrick Allo
  • 161
  • 1
  • 1
  • 7
3
votes
1 answer

Can you point all of a TLD towards Localhost in a hostsfile?

Is it possible to point all of a TLD (like .dev), towards localhost with the hostsfile and without having to set up a local DNS server? Would be awesome for local web development!
Kyle
  • 552
  • 2
  • 5
  • 16
3
votes
2 answers

Puppet write hosts using api call

I'm trying to write a puppet function that calls my hosting environment (rackspace cloud atm) to list servers, then update my hosts file. My get_hosts function is currently this: require 'rubygems' require 'cloudservers' module…
Ben Smith
  • 157
  • 5
3
votes
1 answer

Lightweight local DNS solution for a developer machine to replace fiddling with /etc/hosts

In our setup we assign a separate domain name for each TCP service for configurability. On production cluster we use BIND to manage it. But on developer machine this currently translates to a bunch of entries in /etc/hosts: 127.0.6.4…
Alexander Gladysh
  • 2,343
  • 7
  • 30
  • 47
3
votes
5 answers

Not able to get hosts file working on my Linux server

I have Ubuntu 11.10 running on VirtualBox and I've set up a virtual named server. I'm able to access this site from Windows 7, but I'm not able to access the site from Ubuntu. My HOSTS file is located in /etc/ folder and looks like this: 127.0.0.1 …
Steven
  • 275
  • 2
  • 9
  • 21
3
votes
1 answer

Where is the host file located on OpenVMS systems?

Hosts (file) entry on Wikipedia has a table listing the location name of the hosts file (which maps hostnames to IP addresses) on various systems. Where is this info stored on OpenVMS systems?
CW Holeman II
  • 421
  • 1
  • 8
  • 23
1
2
3
9 10