Re: Internet connection on Linux
- From: Olaf Klischat <klischat@xxxxxxxxxxxxxxx>
- Date: Sat, 26 Apr 2008 20:43:22 +0200
CCW <c.c.wood@xxxxxxxxx> writes:
I think I've found my problem; when I run
$> iptables -L
all I get is
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
I'm pretty sure I'm supposed to have some rules there...!
Maybe, but those settings allow all traffic to pass into/out
of/through the box, so there shouldn't be a problem there.
Really, check that /etc/host.conf contains "bind" in the "order" line,
as the previous poster suggested.
As a last resort, I'd strace a ping on a name to see if it really goes
out to a DNS server, and if so, which one. E.g.:
tack:~# strace ping www.google.com 2>&1 | grep 53 | grep htons
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.142.1")}, 28) = 0
recvfrom(4, "D\36\201\200\0\1\0\5\0\0\0\0\3www\6google\3com\0\0\1\0"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.142.1")}, [16]) = 126
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.142.1")}, 28) = 0
recvfrom(4, "|\243\201\200\0\1\0\1\0\0\0\0\003147\003135\00285\0032"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.142.1")}, [16]) = 80
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.142.1")}, 28) = 0
recvfrom(4, ">B\201\200\0\1\0\1\0\0\0\0\003147\003135\00285\003209\7"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.142.1")}, [16]) = 80
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.142.1")}, 28) = 0
Here, 192.168.142.1 is the DNS server's IP address. The recvfrom calls
mean the server is responding. If there were only "connect" calls, it
would mean that the server is not responding. If nothing is output at
all, it doesn't even try to connect a DNS server (which should only
happen if something's misconfigured in your /etc/host.conf, or maybe
if you don't have anything in your resolv.conf, but you do).
.
- References:
- Internet connection on Linux
- From: CCW
- Re: Internet connection on Linux
- From: Shadow_7
- Re: Internet connection on Linux
- From: CCW
- Re: Internet connection on Linux
- From: Jack Snodgrass
- Re: Internet connection on Linux
- From: CCW
- Internet connection on Linux
- Prev by Date: Wireshark on Ubuntu
- Next by Date: Re: Wireshark on Ubuntu
- Previous by thread: Re: Internet connection on Linux
- Next by thread: Re: Internet connection on Linux
- Index(es):
Relevant Pages
|