Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 12197  / 1 Year ago, mon, march 20, 2023, 4:47:30

I am not able to browse any websites. Please take a look at the following error:



karthick@karthick:~$ ping www.google.com                         
ping: unknown host www.google.com


Update



karthick@karthick:~$ dig www.google.com

; <<>> DiG 9.7.1-P2 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26402
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 4, ADDITIONAL: 4

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

;; ANSWER SECTION:
www.google.com. 238583 IN CNAME www.l.google.com.
www.l.google.com. 97 IN A 74.125.236.50
www.l.google.com. 97 IN A 74.125.236.48
www.l.google.com. 97 IN A 74.125.236.52
www.l.google.com. 97 IN A 74.125.236.49
www.l.google.com. 97 IN A 74.125.236.51

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

;; ADDITIONAL SECTION:
ns2.google.com. 317814 IN A 216.239.34.10
ns1.google.com. 317814 IN A 216.239.32.10
ns3.google.com. 317814 IN A 216.239.36.10
ns4.google.com. 317814 IN A 216.239.38.10

;; Query time: 5 msec
;; SERVER: 172.29.39.212#53(172.29.39.212)
;; WHEN: Wed Aug 3 15:30:38 2011
;; MSG SIZE rcvd: 268


Output:



karthick@karthick:~$ ifconfig
eth0 Link encap:Ethernet HWaddr bc:30:5b:c4:fd:dc
inet addr:172.29.XX.XX Bcast:172.29.XX.XXX Mask:255.255.255.0
inet6 addr: fe80::be30:5bff:fec4:fddc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1757954 errors:0 dropped:0 overruns:0 frame:0
TX packets:1422948 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1329324192 (1.3 GB) TX bytes:1231317787 (1.2 GB)
Interrupt:16

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10528 errors:0 dropped:0 overruns:0 frame:0
TX packets:10528 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:768164 (768.1 KB) TX bytes:768164 (768.1 KB)

karthick@karthick:~$ sudo iptables -nvL
[sudo] password for karthick:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

More From » networking

 Answers
5

I have found that the problem lies in this file /etc/nsswitch.conf. In that file dns entry was missed. After adding that entry i am able to browse the sites.



NSSWITCH


[#44014] Tuesday, March 21, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bathtusain

Total Points: 380
Total Questions: 124
Total Answers: 111

Location: Trinidad and Tobago
Member since Sat, Apr 9, 2022
2 Years ago
bathtusain questions
Sun, Jul 17, 22, 03:13, 2 Years ago
Sun, Oct 3, 21, 00:24, 3 Years ago
Sat, Apr 22, 23, 00:24, 1 Year ago
Fri, Jul 22, 22, 12:01, 2 Years ago
Sun, Jun 27, 21, 02:31, 3 Years ago
;