Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#453272: net-tools: netstat reports IPv4 TCP connections as IPv6 TCP (tcp6)

105 views
Skip to first unread message

Pierre THIERRY

unread,
Nov 28, 2007, 4:50:11 AM11/28/07
to
Package: net-tools
Version: 1.60-17.2
Severity: normal

When running netstat -t, assuming I'm sitting on system foo.work.com
with open connections to the office's mail server mail.work.com and an
open SSH connection to some corporate server quux.work.com and one to my
home box bar.isp.net, with another box baz.work.com in the office
downloading something from my local web server, I have an output like
this:

tcp 0 0 foo.work.com:51768 mail.work.com:imaps ESTABLISHED
tcp 0 0 foo.work.com:51769 mail.work.com:imaps ESTABLISHED
tcp 0 0 foo.work.com:36155 quux.work.com:ssh ESTABLISHED
tcp6 0 0 foo.work.com:www baz.work.com:59359 ESTABLISHED
tcp6 0 0 foo.work.com:38310 bar.isp.net:ssh ESTABLISHED

The two last connections are reported as tcp6,n although foo.work.com
and baz.work.com have no routable IPv6 addresses. foo has a link-local
IPv6 address, but baz most probably don't (a windows box) and bar has a
public IPv6 address, but is unreachable in IPv6 from foo.


-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages net-tools depends on:
ii libc6 2.6.1-1+b1 GNU C Library: Shared libraries

net-tools recommends no packages.

-- no debconf information

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Bernd Eckenfels

unread,
Nov 28, 2007, 6:50:09 PM11/28/07
to
On Wed, Nov 28, 2007 at 10:16:14AM +0100, Pierre THIERRY wrote:
> tcp6 0 0 foo.work.com:www baz.work.com:59359 ESTABLISHED
> tcp6 0 0 foo.work.com:38310 bar.isp.net:ssh ESTABLISHED
>
> The two last connections are reported as tcp6,n although foo.work.com
> and baz.work.com have no routable IPv6 addresses. foo has a link-local
> IPv6 address, but baz most probably don't (a windows box) and bar has a
> public IPv6 address, but is unreachable in IPv6 from foo.

try "netstat -tn", add the output of "lsof -ni" and the content of
/proc/net/tcp and /proc/net/tcp6 to the output, please.

Greetings
Bernd
--
(OO) -- Bernd_Eckenfels@Mörscher_Strasse_8.76185Karlsruhe.de --
( .. ) ecki@{inka.de,linux.de,debian.org} http://www.eckes.org/
o--o 1024D/E383CD7E eckes@IRCNet v:+497211603874 f:+49721151516129
(O____O) When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!

Pierre THIERRY

unread,
Nov 28, 2007, 8:20:08 PM11/28/07
to
Scribit Bernd Eckenfels dies 29/11/2007 hora 00:29:

> try "netstat -tn", add the output of "lsof -ni"

The adresses in "netstat -tn" are shown as IPv4 as IPv6 adresses
(::ffff:10.0.0.1:22), and lsof reports the connections as IPv6 ones.

It happened for two services, apache2 and sshd, that listen both on IPv4
and IPv6. If that's a "normal" behaviour for such services, documenting
it in netstat's manpage would be very helpful.

Quickly,
Pierre
--
nowhe...@levallois.eu.org
OpenPGP 0xD9D50D8A

signature.asc

Bernd Eckenfels

unread,
Dec 1, 2007, 12:20:13 PM12/1/07
to
On Thu, Nov 29, 2007 at 01:40:18AM +0100, Pierre THIERRY wrote:
> It happened for two services, apache2 and sshd, that listen both on IPv4
> and IPv6. If that's a "normal" behaviour for such services, documenting
> it in netstat's manpage would be very helpful.

The problem is, that somewhat changed in different kernels. I thought about
writing "tcp46" instead in the netstat output (or parsing the addresses) but
maybe a man page entry is enough.

Gruss

0 new messages