LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Google.com wont load but google IP will. Entering IP in /etc/hosts, doesnt work (https://www.linuxquestions.org/questions/linux-networking-3/google-com-wont-load-but-google-ip-will-entering-ip-in-etc-hosts-doesnt-work-814896/)

Lyle 06-18-2010 06:07 AM

Google.com wont load but google IP will. Entering IP in /etc/hosts, doesnt work
 
I can access google by their IP address, however clicking any link redirects to google.com rather than their IP.

it's my understanding that if
74.125.47.147 google.com
is in the hosts file it will bypass the DNS server and go directly to the IP.. Well, this is what i want to have happen.

MensaWater 06-18-2010 06:52 AM

When I run "dig google.com" I see:

dig google.com

Code:

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16115
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.            300    IN      A      74.125.157.99
google.com.            300    IN      A      74.125.157.104
google.com.            300    IN      A      74.125.157.147

;; AUTHORITY SECTION:
google.com.            118925  IN      NS      ns2.google.com.
google.com.            118925  IN      NS      ns3.google.com.
google.com.            118925  IN      NS      ns4.google.com.
google.com.            118925  IN      NS      ns1.google.com.

;; Query time: 11 msec
;; SERVER: 10.0.4.99#53(10.0.4.99)
;; WHEN: Fri Jun 18 07:44:05 2010
;; MSG SIZE  rcvd: 148

The IP you listed is NOT returned for Google.

When I run dig www.google.com I see:

Code:

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10507
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.        17376  IN      CNAME  www.l.google.com.
www.l.google.com.      300    IN      A      74.125.157.99
www.l.google.com.      300    IN      A      74.125.157.104
www.l.google.com.      300    IN      A      74.125.157.147

;; Query time: 7 msec
;; SERVER: 10.0.4.99#53(10.0.4.99)
;; WHEN: Fri Jun 18 07:49:21 2010
;; MSG SIZE  rcvd: 100

Again the IP you listed is NOT one of the above sites.


When I run dig -x 74.125.47.147 I see:

Code:

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> -x 74.125.47.147
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58068
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;147.47.125.74.in-addr.arpa.    IN      PTR

;; ANSWER SECTION:
147.47.125.74.in-addr.arpa. 86400 IN    PTR    yw-in-f147.1e100.net.

;; AUTHORITY SECTION:
125.74.in-addr.arpa.    72966  IN      NS      NS2.GOOGLE.COM.
125.74.in-addr.arpa.    72966  IN      NS      NS3.GOOGLE.COM.
125.74.in-addr.arpa.    72966  IN      NS      NS4.GOOGLE.COM.
125.74.in-addr.arpa.    72966  IN      NS      NS1.GOOGLE.COM.

;; Query time: 10 msec
;; SERVER: 10.0.4.99#53(10.0.4.99)
;; WHEN: Fri Jun 18 07:46:18 2010
;; MSG SIZE  rcvd: 160

Whois indicates 1e100.net is owned by Google. However the above digs suggest that this is NOT the main Google site as you seem to think. Without knowing what the purpose of 1e100.net is I don't think I'd be going there.

What happens when you run dig from where you are?

jefro 06-18-2010 02:54 PM

Links in google are like using a new dns. They don't go though hosts.


What does nslookup www.google.com return?


All times are GMT -5. The time now is 04:50 PM.