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
0
votes
0 answers

Lynx command line browser and the 'hosts' file

I am building a small web app for my company and currently I have this weird issue: I have 2 instances of the web app running, one accessible through the internet and another one for internal purposes and testing only. The internal version has a…
dlyk1988
  • 1,644
  • 4
  • 24
  • 36
0
votes
2 answers

How to use pfSense as a firewall in order to assign url whitelists to IP groups

In a corporate network without DHCP, the temporary solution to whitelist a couple of useful sites is to change the hosts file under Windows/System32/drivers/etc/ but since modern sites tend to change their IP very often and also taking into…
user224090
0
votes
1 answer

Can winbind influence name resolution in Linux

I have to Linux boxes on vagrant, the have the same /etc/resolv.conf and /etc/hosts, but one is using winbind to do SSO with Active Directory. When I try to resolve the domain controllers with: dig SRV _ldap._tcp.wonga.com on the server with…
rtacconi
  • 735
  • 3
  • 14
  • 28
0
votes
1 answer

Hostname aliases in LDAP and phpLDAPadmin

What is the best method of storing multiple hostname aliases in LDAP? Currently, the hosts file I wish to migrate has many entries such as 172.24.3.54 workstation114.example.net wks114 exphost3 From my testing, using device and ipHost classes…
sargant
  • 113
  • 7
0
votes
1 answer

How to resolve external host names in a centraliced place

Our LAN is connected to another company's LAN and we have access to some of their servers, but not to their DNS server. When the users need access to some host by name, the solution I have is to go to their machine and add an entry to…
xabitrigo
  • 103
  • 1
0
votes
1 answer

tftp times out on localhost

On the same server, I can't connect to my in.tftp over localhost name: $ tftp localhost -c put test.file && echo Sent\! Transfer timed out. $ tftp 127.0.0.1 -c put test.file && echo Sent\! Sent! Does the tftp centos client ignore the hosts file? …
AXE Labs
  • 1,519
  • 5
  • 19
  • 24
0
votes
3 answers

name resolution by name in /etc/hosts

I have to check website performance through various webproxies from my Fedora 19 box, and I want to do that by setting a local resolvable name "proxy" to the DNS resolved names for our proxies in my /etc/hosts file. So, contents of /etc/hosts file…
DrStrangepork
  • 578
  • 1
  • 8
  • 18
0
votes
0 answers

How to make dnsmasq resolve a domain based on where a query were made from

On my phone, I'm pointing to my PC address for DNS server (dnsmasq), and it is working for normal DNS queries but not for local. I can see from a ping app that local domains are resolved to 127.0.0.1, and that's logical, but not what I want in this…
Edmund24
  • 1
  • 1
0
votes
3 answers

Guests can't access KVM host server by name although nslookup and dig returns correct record

So I have a KVM host that also runs an apache server with some yum repos. The VM guests are connected to the default virtual network, which is configured to offer DHCP and forwarding with NAT on virbr0 (192.168.12.1). The guests can successfully…
0
votes
1 answer

Managing hosts and iptables in scalable architecture

Let's say I have a load balancer in front of 3 app servers. Let's say I also have these services available at certain IPs: Postgres server Redis server ElasticSearch server Memcached server 1 Memcached server 2 Memcached server 3 So that's 6 nodes…
Max Chernyak
  • 650
  • 8
  • 21
0
votes
3 answers

Local alias in /etc/hosts not working anymore without internet connection

I have my developer machine on which I work on web applications running under apache on Debian testing. Now I like to be able to have myApp as domain name and not to have to use localhost or 127.0.0.1 in my browser address bar. Some CMS software…
user68729
0
votes
1 answer

How do I change the received url in outgoing emails

I've got a cheap and cheerful dedicated server from 1and1 that I use to send emails. The received email header looks like this: Received: from s123456.onlinehome-server.info (s123456.onlinehome-server.info. [82.165.11.111]) I'd like that to…
Grim...
  • 351
  • 1
  • 2
  • 9
0
votes
2 answers

puppet content of /etc/hosts template with facter

I have set up a template to set up the content of the /etc/hosts file. Here is my template: 127.0.0.1 localhost.localdomain localhost <%= scope.lookupvar('ipaddress') %> <%= scope.lookupvar('fqdn') %> <%= scope.lookupvar('hostname') %> This is…
philippe
  • 2,131
  • 4
  • 30
  • 53
0
votes
1 answer

CentOS 5.8 why does my /etc/hosts file mess up after a reboot?

I'm running CentOS 5.8 (it's the Citrix XVA appliance provided on the website) but having an issue where every time I restart the server, the /etc/hosts file loses the IP address of the server...for instance, the way the host file should looks is…
cjones26
  • 276
  • 1
  • 6
  • 18
0
votes
1 answer

the WIndows hosts file

Can I map a domain to another domain (mirror)? I wish to map php.net to de.php.net, so when I access something like php.net/whatever, the browser will display stuff from de.php.net/whatever (the mirror is faster :P). Adding this line in the hosts…