[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem Resolving names into ip addresses



On Fri, 2005-12-30 at 09:43 -0500, Marty Landman wrote:
> At 09:07 AM 12/30/2005, Matt Zagrabelny wrote:
> 
> >you can use tcpdump to see if (and who) you are querying for your name
> >resolutions:
> >
> ># tcpdump -tqn dst port 53
> 
> I'm trying to learn a bit here and although name res is working on my box 
> have done an apt-get install tcpdump but when trying this get:
> 
> UNCLELEO:/home/marty# tcpdump -tqn dst port 53
> tcpdump: getifaddrs: Connection refused
> UNCLELEO:/home/marty# tcpdump -tqn dst port 80
> tcpdump: getifaddrs: Connection refused
> UNCLELEO:/home/marty#

this problem looks to be about your interface. do:

# ifconfig 

and see what interface has the ipaddress that corresponds to the
"outside" world. (ie. what interface corresponds to your default route.)

and do:

# tcpdump -tqn -i <interface> dst port 53

> 
> 
> Not sure if this might've been caused by a problem noted during the install 
> process:

> 
> UNCLELEO:/home/marty# find / -name tcpdump
> UNCLELEO:/home/marty# apt-get install tcpdump
> Reading Package Lists... Done
> Building Dependency Tree... Done
> The following extra packages will be installed:
>    libpcap0.8
> The following NEW packages will be installed:
>    libpcap0.8 tcpdump
> 0 packages upgraded, 2 newly installed, 0 to remove and 133  not upgraded.
> Need to get 320kB of archives. After unpacking 725kB will be used.
> Do you want to continue? [Y/n]
> Get:1 http://http.us.debian.org stable/main libpcap0.8 0.8.3-5 [81.8kB]
> Get:2 http://http.us.debian.org stable/main tcpdump 3.8.3-5sarge1 [239kB]
> Fetched 320kB in 2m29s (2150B/s)
> W: Couldn't stat source package list ftp://ftp.nerim.net woody/main 
> Packages 
> (/var/lib/apt/lists/ftp.nerim.net_debian-marillat_dists_woody_main_binary-i386_Packages) 
> - stat (2 No such file or directory)
> Selecting previously deselected package libpcap0.8.
> (Reading database ... 15572 files and directories currently installed.)
> Unpacking libpcap0.8 (from .../libpcap0.8_0.8.3-5_i386.deb) ...
> Selecting previously deselected package tcpdump.
> Unpacking tcpdump (from .../tcpdump_3.8.3-5sarge1_i386.deb) ...
> Setting up libpcap0.8 (0.8.3-5) ...
> 
> Setting up tcpdump (3.8.3-5sarge1) ...
> W: Couldn't stat source package list ftp://ftp.nerim.net woody/main 
> Packages 
> (/var/lib/apt/lists/ftp.nerim.net_debian-marillat_dists_woody_main_binary-i386_Packages) 
> - stat (2 No such file or directory)
> W: You may want to run apt-get update to correct these problems
> UNCLELEO:/home/marty# which tcpdump
> /usr/sbin/tcpdump

no, the problems during install had to do with outdated repositories.
tcpdump installed clean.

ps. if you are new to debian, you might want to try using aptitude
instead of apt-get, it is *mostly* compatible from the command line
point of view, has a fantastic gui, keeps a log of actions
(/var/log/aptitude), and does a good job of keeping your system clean
(removing unneeded packages when they are no longer needed).

-matt zagrabelny



Reply to: