Questions tagged [hosts]

A `hosts` file is used to map hostnames to IP addresses on a TCP/IP-enabled computer.

A hosts file is used to map hostnames to IP addresses on a TCP/IP-enabled computer. On Unix and Unix-like operating systems (Linux, OSX, FreeBSD, NetBSD, et al), the file is located at /etc/hosts. In Microsoft Windows, the file may be located in different places depending on the version of the operating system. In Plan 9 from Bell Labs it is located at /lib/ndb/hosts

On most systems, the behaviour of /etc/hosts depends on configuration within the /etc/nsswitch.conf file.

841 questions
-1
votes
1 answer

Editing my /etc/host.deny

I'm being trolled by China, and don't know why I can't block their request to my server. //host.deny ALL: item.taobao.com ALL: 117.25.128.* But when I watch the error log on my webserver tail -f /var/log/apache2/error.log the requests are still…
Jordan Davis
  • 1,485
  • 7
  • 21
  • 40
-1
votes
1 answer

How to create network file based on IP address from file similar to /etc/hosts

I have a file which maps IP address to hostnames. Its format is similar to hosts file and contains a list of IP address to hostname mapping. eg. 10.200.99.1 master1 10.200.99.2 master2 10.200.99.3 master3 10.200.99.4 slave1 10.200.99.5 …
Shahrukh Khan
  • 316
  • 1
  • 3
  • 15
-1
votes
1 answer

How to test domain-redirect locally in Windows 7?

We have a website that is hosted on a domain brand.hostingcompany.com The website has bought a new domain and I wish to point the new domain to that site. I want to test this redirect on my computer running windows 7 before doing it live. I tried…
Himmators
  • 14,278
  • 36
  • 132
  • 223
-1
votes
1 answer

rails 2.3 server running inside vagrant environment not accessible in host machine mac os x browsers

in vagrant I am using: box 'prorail/centos-5.8-x86_64' in vagrant i am running rails 2.3 server like: [vagrant@localhost myapp]$ script/server => Booting Mongrel => Rails 2.3.5 application starting on http://0.0.0.0:3000 => Call with -d to detach =>…
Bilal Basharat
  • 3,066
  • 6
  • 21
  • 20
-1
votes
1 answer

I have configured a vagrant file, and I need a dev.domain.com pointing to 55.55.55.5/public

I have configured a vagrant file, and I need a dev.domain.com pointing to 55.55.55.5/public My website works with the /public folder, but in the dev.domain.com I need to enter to public/ to see the page, so all styles, javascripts and files that…
Juan Manuel Masud
  • 684
  • 1
  • 7
  • 15
-1
votes
2 answers

Try to understand a bit more with /etc/hosts

The goal Type wiki.me (a park domain) in web browser, will direct to 198.35.26.96 (which is the ip of en.wikipedia.org), then eventually display content in en.wikipedia.org Using ubuntu 14.10 and I added 198.35.26.96 wiki.me wiki to /etc/hosts. I…
kenpeter
  • 7,404
  • 14
  • 64
  • 95
-1
votes
1 answer

NSLookup Script to update hosts file once a week.

First time poster so my apologies if this has been covered in a previous topic that I was unable to locate. Basically I'm tasked with creating a script to perform a NSLookup on 50 domain names, format the results and pass them to the hosts file.…
Zivs
  • 1
  • 2
-1
votes
1 answer

ServerName vs Hostname ( /etc/sysconfig/network vs /etc/hosts ) what is the difference?

If i want to name my server.. x.domain.tld why must i edit 2 files in order to accomplish this. the two files being: /etc/sysconfig/network /etc/hosts also does the servername or hostname.. do i need to create an A record for it with my DNS…
-1
votes
1 answer

ping localhosts, edit /etc/network/hosts

I want to succesfully ping some hostnames. These hostnames have the same IP, 127.0.0.1 So i edited /etc/network/hosts: 127.0.0.1 host1 127.0.0.1 host2 127.0.0.1 host3 127.0.0.1 host4 127.0.0.1 host5 127.0.0.1 host6 127.0.0.1 host7 127.0.0.1…
FrancescoN
  • 2,146
  • 12
  • 34
  • 45
-1
votes
1 answer

Same host and file_get_contents

I have a problem with the file_get_contents function. One week ago every thing was perfect. Today when i call via file_get_contents a file which is on the same HOST/Server, it fails. The result is, that i get the startpage of google.de. Then i tried…
mr_app
  • 1,292
  • 2
  • 16
  • 37
-1
votes
1 answer

How can I change host Name for Apache tomcat server?

I installed Apache Tomcat 6.0,I tested with simple Application it's working fine.but every time I calling my app with localhost:8080 in the browser. I want to change host name(localhost) to something like subbu.for this I tried in the following…
subbu
  • 562
  • 3
  • 8
  • 21
-1
votes
1 answer

Improper behavior of Host Alias

I have two host alias in my directory structure that fail to properly register with g-wan. My folder structure is as follows: /srv/gwan_linux64-bit/192.168.3.101_80/$dg.lcl /srv/gwan_linux64-bit/192.168.3.101_80/$myapp …
celilo
  • 9
  • 3
-1
votes
3 answers

Unblock specific websites

Using hostfile in C# I can block websites but I couldn't unblock them. String path = @"C:\Windows\System32\drivers\etc\hosts"; StreamWriter sw = new StreamWriter(path, true); sitetoblock = "\r\n127.0.0.1\t" +…
user1913674
  • 85
  • 1
  • 7
-1
votes
2 answers

C# Text-stream access denied

I guess you know this file well, it's a file for binding some IP to hostnames. C:\Windows\System32\Drivers\etc\hosts Notepad can make changes on this file but C# Text-stream couldn't do anything on it and says access denied. Any ideas why this is…
Ali Bahrami
  • 5,935
  • 3
  • 34
  • 53
-2
votes
0 answers

Adding hosts to zabbix

Good afternoon. The Zabbix system is accessible and fast. There was a need to raise another system. The settings of zabbix_agentd.conf and zabbix_server.conf are identical. Try to invite the hosts to a new server, oibki of the form: pg_query():…
1 2 3
55
56