Hot answers tagged

38

To prevent the hosts entries from being commented out by Bitdefender 2016 do the following: In the main Bitdefender interface click on the human icon (from the upper right corner) and choose General Settings > Advanced tab > "Scan hosts file" button.


28

In OS X 10.9.1 w/ Chrome 32 I needed to both clear the host cache and flush the socket pools to get Chrome to refresh the DNS cache: Navigate to chrome://net-internals/#dns and click "Clear Host Cache" Navigate to chrome://net-internals/#sockets abd click "Flush Socket Pools"


27

You need to run the following command to get rid of this problem. Open the terminal and type the following command: For all examples below just replace the value after -R: ssh-keygen -R server-name ssh-keygen -R server.ip.addre.ss ssh-keygen -R 202.54.1.5 ssh-keygen -R server1.example.com


25

Most likely that "NPI2A54EB" is (was?) a network attached HP printer, as it appears to follow their default JetDirect naming convention. Here's a few of ours for example/comparison: NPI191832, NPI4B6E05, NPI907B3F, NPI95393C, NPIB80D5E, NPIB81360, etc. From HP's HP Jetdirect Print Servers - Jetdirect Configuration Options a using DHCP, WINS, and DDNS ...


23

I put also these two into my "c:\Windows\System32\Drivers\etc\hosts" file: (for mac the file location is: "/private/etc/hosts"), however, as others may suggest, later on new ad sites filtering might need. 127.0.0.1 rmp.rakuten.com 127.0.0.1 s-bid.rmp.rakuten.com ... so I have these now: (Viber related) 127.0.0.1 ads.viber.com 127.0.0.1 ads.aws.viber.com ...


22

Hosts file can only be used to associate a domain name with an IP; it cannot map IP to IP. Altering IPs can be done by a firewall. On Linux, the default firewall is controlled by iptables commands. "man iptables" is the documentation. Google "explain iptables" for introductory explanations. Some links: http://linux.die.net/man/8/iptables http://www....


21

For a single ssh session, use this ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null user@host


19

All answers are good, but for real SSH pro we have missing information how to remove ssh signature with (non-standard) port number. Simple SSH host signature remove command: ssh-keygen -R example.com Complex ssh key remove, e.g. you connect to ssh on non standard port 222: ssh example.com -p 222 and you get warning, and to remove this, you need to use ...


18

Try removing the www. Just: 127.0.0.1 thatstamil.com 127.0.0.1 tamil.oneindia.com 127.0.0.1 facebook.com


18

Look at System Preferences -> Network If the currently active "Location" has one or more DNS servers listed then the system will create the file "/etc/resolv.conf" which will list those nameservers as the place to go for resolution, bypassing /etc/hosts entirely resolv.conf is created dynamically by "Network" prefs, and overwritten based on the "DNS Server"...


14

Rather then running echo through a redirect which will be run as your current user, not root as echo is being run in your example, use tee as Steve Buzonas suggests echo 'test' | sudo tee -a /etc/hosts The sudo is now applied to the tee command. The '-a' appends to the file This will also output tee to standard output. If you don't want to see 'test' in ...


13

The file might be corrupted/damaged, it has to be an ASCII file. You should recreate it: move the old file with mv -f /etc/hosts /etc/oldhosts create a new file with nano populate it with the values of the old file save it as /etc/hosts That should do it.


13

I had the same problem. Write about:config in the address bar. Search for dns and change network.dns.offline-local to false.


12

I know this is an old question but I got annoyed by same the complaints as others: even after clearing the cache it can still take a minute or two for the new DNS changes to kick in. There are a few ways around it. After clearing the DNS cache through chrome://net-internals/#dns (or using an extension that achieves the same result): Open an incognito ...


12

The following in your hosts file 127.0.0.1 example.com ...makes both http://example.com and https://example.com go to 127.0.0.1, hence: your own machine. (Even more: anything that refers to example.com, such as ping or telnet would go to 127.0.0.1 when run from your computer.) Apparently you have a web server running on your own computer on port 80 (HTTP),...


12

Sul, Cause: Bitdefender Total Security 2016 is causing this problem Fix: Right click on hosts file, properties, security, give only read access to "ALL APPLICATION PACKAGES" user/group. Reference: http://www.bitdefender.com/security/hosts-file-hijacking-becomes-impossible-in-windows-8.html


11

Dnsmasq is what you need but it doesn't work quite well on Windows. So I wrote an alternative on Windows called DNSAgent. You can use regular expression in rules. There is also some advanced features like customizing cache TTL, non-standard-port DNS server, compression pointer mutation, etc. Open sourced under MIT license.


9

You can also instruct ssh to not check the known_hosts file using the UserKnownHostsFile and StrictHostKeyChecking flags. For instance: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no user@example.com For ease of use you can alias this: alias boldssh='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' Now you can just ...


8

Get local application ProcessID use port 80: netstat -aon | findstr "LISTENING" | find /i ":80" | more var 2: netstat -aon | find /i ":80" | more Get application command line: Wmic process where (ProcessId=<you application ProcessID>) get Commandline, ProcessId Get service command line: wmic Service where (ProcessID=<you application ...


8

Shorter answer. My guess is that hosts entry is just some shortcut the developer who had the machine previously setup for their convenience and is nothing to worry about. If somehow you are concerned about this specific entry, then just comment out that line in the hosts file, restart the machine and move on. Perhaps check the hosts file again on reboot to ...


8

Mostly dupe How to add multiple IPv6 address for single host in /etc/hosts? as auto-suggested by Stack. Can a hostfile entry point to multiple addresses? NO Can a hostfile have a hostname pointed to multiple addresses? YES You can have multiple entries for the same name, e.g.: 192.168.99.12 testhost.local 192.168.99.34 testhost.local 192.168.99.56 ...


7

Chrome_Hosts_Flush_Util: It is to resolve the problem that Chrome can't use the correct hosts after modifying the hosts file because of Chrome using socket pools. Chrome maintains long connections in the connection pool to speed up. When Chrome finds that a request can reuse a connection in the connection pool, it won't go through the DNS again, thus, we ...


7

127.0.0.1 images.taboola.com 127.0.0.1 api.taboola.com Do the job. First for kill image. Second for kill load ads data from this ads network. But if viber switch to other ads network, this solution stop work. Or if it use another network for you. I suggest install DNSQuerySniffer unload viber, run tool, run viber, and monitor your DNS queries. If you see ...


6

Full process: Created site in IIS (windows 8), set host header. Tried hitting the the host with no host file, ensuring to use http:// so it does not just do a google search. Correctly failed in chrome "Version 32.0.1700.76 m" Add host to host file as 127.0.0.1, now can hit it in chrome. Remove from host file and run ipconfig /flushdns, chrome still ...


6

For some, check /etc/resolver/ directory and delete any files there.


6

127.0.0.1 should be sufficient, as this will route any traffic to the loopback adapter. To effectively block the site, use the full DNS name(s): 127.0.0.1 scorpionsaver.com www.scorpionsaver.com subdomain1.scorpionsaver.com Verify that your changes persist after rebooting.


6

/etc/hosts.deny and /etc/hosts.allow are part of TCP-Wrapper, a program developed to deny access to hackers by Wietse Venema in the nineties. TCP wrappers controls TCP access of processes run from /etc/inetd.conf. Most modern Linux distros (all Debian-based, Arch Linux,...) do not have inetd any longer. Some applications are yet controlled by TCPwrapper, ...


6

It won't work for some sites. Hosting one site per server (or per IP address) is not a good idea for small websites. Hosting multiple websites on one IP address is possible, this feature is called virtual hosts. But the server has to somehow check which site you're willing to open. HTTP protocol specification defines has a Host header (which is mandatory ...


6

I have also encountered same problem today and after some trail and error, I got it working without restarting the mac. Try to find the pid of all the processes with name fs_usage and kill it. $ ps -e | grep fs_usage Then kill the processes using the pid $sudo kill -9 pid But your statement I can't find either fs_usage or the ktrace process. I didn'...


6

I fixed it by disabling the "DNS Over HTTPS" Firefox Network option.


Only top voted, non community-wiki answers of a minimum length are eligible