View previous topic :: View next topic |
Author |
Message |
thunktone n00b

Joined: 26 Feb 2012 Posts: 2 Location: Dorset, England
|
Posted: Sun Feb 26, 2012 12:56 pm Post subject: Can ping dns by IP, but web addresses won't resolve [solved] |
|
|
I have found a few similar problems on the forums but no solution that works for me.
This: Code: | ping 208.67.222.222 | works fine.
But this: returns 'unknown host'.
The local network works fine. I can use aliases from /etc/hosts to mount nfs partitions from my nas or ssh onto another computer.
Below are my /etc/resolv.conf, /etc/conf.d/net (showing several attempts to fix the problem) and /etc/wpa_supplicant.conf, and the outputs of ifconfig and route.
Code: | cat /etc/resolv.conf
# Generated by dhcpcd
# Not really generated, the following lines come from resolv.conf.head
nameserver=208.67.222.222
nameserver=208.67.220.220
nameserver=8.8.8.8
option debug |
Code: | cat /etc/conf.d/net
#modules="!iwconfig !wpa_supplicant"
#modules="ifconfig"
config_NotTheNuk="192.168.42.5/24"
routes_NotTheNuk="default via 192.168.42.1"
#dns_servers_NotTheNuk="192.168.1.1"
#dns_servers_NotTheNuk="208.67.222.222 208.67.220.220"
#dns_options_NotTheNuk="timeout:5 attempts:5 rotate"
fallback_NotTheNuk="dhcp"
preferred_aps="NotTheNuk TALKTALK-85E5E4"
|
Code: | cat /etc/wpa_supplicant/wpa_supplicant.conf
update_config=1
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1
country=GB
##### Home network
network={
ssid="NotTheNuk"
psk="(correct psk)"
priority=10
}
##### Anon's place
network={
(irrelevant stuff)
}
|
Code: | ifconfig
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:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:964 (964.0 B) TX bytes:964 (964.0 B)
wlan0 Link encap:Ethernet HWaddr 74:f0:6d:49:b1:0b
inet addr:192.168.42.5 Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::76f0:6dff:fe49:b10b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9113 errors:0 dropped:0 overruns:0 frame:0
TX packets:121 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2253063 (2.1 MiB) TX bytes:12561 (12.2 KiB)
|
Code: | route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.42.0 * 255.255.255.0 U 0 0 0 wlan0
link-local * 255.255.0.0 U 302 0 0 wlan0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default router 0.0.0.0 UG 2002 0 0 wlan0
|
Last edited by thunktone on Mon Feb 27, 2012 2:34 pm; edited 1 time in total |
|
Back to top |
|
 |
papahuhn l33t


Joined: 06 Sep 2004 Posts: 626
|
Posted: Sun Feb 26, 2012 3:27 pm Post subject: |
|
|
Does "host www.duckduckgo.com 208.67.222.222" work? What do you see if you tcpdump for DNS requests and responses? _________________ Death by snoo-snoo! |
|
Back to top |
|
 |
ianw1974 Guru


Joined: 18 Oct 2006 Posts: 387 Location: UK and Poland
|
Posted: Sun Feb 26, 2012 3:51 pm Post subject: |
|
|
Your /etc/resolv.conf looks wrong to me. You shouldn't have the = sign. Mine looks like this:
Code: | nameserver 208.67.222.222
nameserver 208.67.220.220 |
mine just have a space, and not the = inbetween. When I added the = sign on my system, it also failed to resolv DNS. So I expect this is your problem. _________________ Ian Walker
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Linux Systems Limited | Masternode Monitoring |
|
Back to top |
|
 |
thunktone n00b

Joined: 26 Feb 2012 Posts: 2 Location: Dorset, England
|
Posted: Mon Feb 27, 2012 2:33 pm Post subject: |
|
|
thanks guys, ianw1974's solution worked |
|
Back to top |
|
 |
|