No squid and DNS Install - linux

On my local machine i got this error:
While trying to retrieve the URL: http://example.com/
The following error was encountered:
Unable to determine IP address from host name for example.com
The dnsserver returned:
Name Error: The domain name does not exist. This means that:
The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct. Your cache administrator is
webmaster.
I do not have any DNS server and SQUID install.

Your ISP probably has a transparent proxy, as many of them do. There can be a statusline underneath this error page, something in lines of Squid at <ip>, which might give you a clue as to where this cache resides.

It's not your side issue. probably reasons for this:
It's a bad domain name, no IP bind to it. (I can't access this site either, so could you double check the name)
Your ISP is facing some DNS issue. just report it if your friend can access the site.
You changed your DNS setting mistakenly. (since you said it only occurs when you trying to access this site, I think this is not the case)
EDIT: I looked up the domain you provide at some DNS lookup tools, like DNS Watch, no result. probably the domain issue

Related

whois lookup shows correct ip but why my browser can not find IP address of domain?

My website suddenly stopped working.
When I search for the domain name in WHOIS websites it is showing the correct server ip address and correct DNS IP address.
I can reach the website by its IP address but somehow when I am trying the domain name in browser its not working and its showing "This site can’t be reached"!
There is no error in my server log.
I tried different browsers and different systems and it is same issue.
I am really confused. Even when I am sending GET requests with Postman to my domain, it not reachable but sending request to IP is working!
whois and DNS resolution are two separate things and one does not imply anything for the other, so in short, except in very specific cases, if you have a DNS resolution problem you should use DNS troubleshooting tools, not the whois and especially not web-based whois (the only relevant whois is the registry one).
Now you are giving so few details that noone can really help.
Among the possible ideas to check and probable problems:
you forgot to renew the domain, your registrar put it on hold or worse deleted it (that you can see in whois)
you did a change in the DNS resolution and now it does not work anymore, use online troubleshooting tools like Zonemaster or DNSViz; alternatively your registrar and/or webhosting company should be able to help (since you are neither giving here the domain name nor details about the troubleshooting you do: for DNS problems, the browser is not the first tool to use, look instead at dig).
in appear that the problem was DNS on our local system. we changed it to 8.8.8.8 and then we could access to our domain!
it's usually because you use an addon domain, not the main domain for hosting orders that are set up on cpanel whm

How does my local HOSTS file resolve but IP will not

I'm in the process of launching a new website. I migrated all the code to the new server. The admin at the new host told me that I have to add an entry to my hosts file and then I will be able to see the website. So essentially he had me add:
111.222.3333.4444 example.com www.example.com
These are example, but after doing this, it worked. My question is, is how? If I visit the IP directly in my browser I get a 403 Forbidden error. Does the host have a way to resolve this IP to a location on their server if resolved from a domain name? I'm just confused as to how this works. I understand that by changing the IP address I can get the domain name to resolve to any IP, but I'm wondering why, on the hosts end, does this now resolve this way, but not by typing in the IP directly.
Thanks!
Does the host have a way to resolve this IP to a location on their
server if resolved from a domain name?
Not exactly. Your browser, when sending the request to the IP address, will send one important piece of information called 'Host header', that is the actual host name as you typed in your browser.
You usually can not open the website just by entering the IP address in your browser's address bar because web servers (and possibly many other network components that are between you and the web server) often do not host only one web site on that IP address so they rely on exact domain name typed in address bar to serve the right content.
You can test this by using one of the browser add-ons that allow you to add your own headers. Add header named 'Host' with the value 'example.com' and with that try to open your site by typing only provided IP address.

Setup CNAME alias from one domain to another

I'm attempting to satisfy the Cookieless domain suggestion of Google's Page Speed plugin and am running into a wall with my host who can't be bothered with the details of why it's not working. Accessing st1.dgcstatic.com should be the same as accessing st1.defunctgames.com; however, this is not the case.
Have I missed a step of configuration? Do I need to wait for DNS propagation? You can see below my steps of experimentation.
DNS Setup:
Created CNAME of st1.dgcstatic.com to point to st1.defunctgames.com on dgcstatic.com
Created A record of st1.defunctgames.com on defunctgames.com
Created sub-domain of st1.defunctgames.com on defunctgames.com
When I run a tracert st1.dgcstatic.com it produces the following result:
C:\Users\Patrick>tracert st1.dgcstatic.com
Tracing route to st1.defunctgames.com [50.22.11.10]
When I run a host st1.dgcstatic.com it produces the following result:
patrick:~ patrick$ host st1.dgcstatic.com
st1.dgcstatic.com is an alias for st1.defunctgames.com.
st1.defunctgames.com has address 50.22.11.10
And finally, using this site it seems to produce the same results of showing things configured correctly.
http://www.mxtoolbox.com/SuperTool.aspx?action=mx%3ast1.dgcstatic.com
According to all these results, the world can see my DNS changes, my host on the other hand gave me the "Wait for propagation" rigmarole When asked why this isn't working.
It looks to me that your domain names are set up correctly (st1.dgcstatic.com is an alias of st1.defunctgames.com), but the web host needs to have a mapping or configuration to know how to serve st1.dgcstatic.com content.
Both domains are resolving to 50.22.11.10, but that is most likely a shared IP address host. (Visiting http://50.22.11.10 demonstrates that it's shared - it can't resolve to your site just by the IP address.)
You'll need to configure through your webhost provider the second domain. Hosting companies do this differently; in my case it's just a matter of adding a new domain to my account (extra $1/mo), and configuring the path for HTML source files.

How does my shared host's nameserver resolve http://servername.com/~username/ to my top level domain?

I recently moved my website to a shared hosting solution at asmallorange.com, but I had to set my domain to use their provided nameservers in order for the site to properly resolve. I was determined to keep control of the domain's DNS but I could find no way to make my top level domain resolve to the shared location which was in the format of
server.asmallorange.com/~username
So I know I'm missing something here, my question is this:
What in their nameservers/DNS entry makes it possible for server.sharedhost.com/~username to serve as a top level domain? (ie. http://topleveldomain.com)
Nothing. DNS simply maps topleveldomain.com to server.sharedhost.com. It's the webserver which looks at the Host: topleveldomain.com header and knows that's equivalent to server.sharedhost.com/~username.
Nothing. They are having your domain name resolve to the same IP that server.asmallorange.com resolves to, but then they are making their web server aware of the domain name topleveldomain.com, and telling the webserver that it is the same as server.asmallorange.com/~username.
Virtual hosts aren't a DNS trick, they're an HTTP trick - the hostname requested is sent by the browser in a Host: field of every request.
apache has a "mod_user" which you can enable in your apache conf file. Using this and virtual hosts is how that is accomplished.
Virtual Hosts in Apache are how this is done.
However just because you set the DNS up to go "mydomain.com resolves to 1.2.3.4", which is their IP address, doesn't mean that you're giving up control of your domain name.

How do I prevent dnsmasq from appending my domain name to invalid domain requests?

I use dnsmasq to resolve DNS queries on my home network. Unfortunately, if a domain name is not known, it will append my own domain name to the request which means that I always end up viewing my own site in a browser.
For example, if I enter http://dlksfhoiahdsfiuhsdf.com in a browser, I end up viewing my own site with that URL. If I try something like:
host dlksfhoiahdsfiuhsdf.com
Instead of the expected:
Host dlksfhoiahdsfiuhsdf.com not found: 3(NXDOMAIN)
I get this:
dlksfhoiahdsfiuhsdf.com.mydomainname.com has address W.X.Y.Z.
Clearly, dnsmasq is appending my domain name to impossible name requests in an effort to resolve them, but I'd rather see the not found error instead.
I've tried playing with the expand-hosts and domain configuration settings, but to no avail. Is there anything else I can try?
try querying with a trailing dot to explicitly set the root:
host dlksfhoiahdsfiuhsdf.com.
It is probably not dnsmasq doing it, but your local resolver library. If you use a unixish, try removing the "search" or "domain" lines from /etc/resolv.conf
There might be other causes, but the most obvious cause is the configuration of /etc/resolv.conf, and the fact that most DNS clients like to be very terse about errors.
benc$ host thing.one
Host thing.one not found: 3(NXDOMAIN)
(okay, what was I using for a DNS config?)
benc$ cat /etc/resolv.conf
nameserver 192.168.1.1
(edit...)
benc$ cat /etc/resolv.conf
search test.com
nameserver 192.168.1.1
benc$ host thing.one
thing.one.test.com has address 64.214.163.132
Without bothering to do a packet trace, the likely behavior is that it returns the error for the last FQDN it tried.
You have a wildcard domain?
dnsmasq is forwarding the appended name out to the external dns server and its getting wildcarded.
you can use --server=/yourinternaldomainhere/ to make sure that your internal domain name lookups are not forwarded out.
syntax in this case would be:
--server=/domain/iptoforwardto
and in this case leave the iptoforwardto area blank as you don't want it to forward anywhere.
I tried removing domain-needed from my own configuration to replicate your issue and it did not produce this behaviour. It's the only other parameter I could find that might be close to relevant.
What does your hosts file look like? Maybe something weird is going on there that makes it think all weird domains are local to your network?

Resources