From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Krzysztof Oledzki <olel@ans.pl>
Cc: netdev@vger.kernel.org
Subject: Re: TCP port randomization
Date: Wed, 17 Oct 2007 15:08:18 -0700 [thread overview]
Message-ID: <20071017150818.0e878846@freepuppy.rosehill> (raw)
In-Reply-To: <Pine.LNX.4.64.0710172308140.12701@bizon.gios.gov.pl>
On Wed, 17 Oct 2007 23:15:48 +0200 (CEST)
Krzysztof Oledzki <olel@ans.pl> wrote:
> Hello,
>
> Is it normal that TCP port randomization (tested with 2.6.22) works only
> when explicitly binding to a IP address:
>
>
> --- cut here ---
> root@fw1:~# nc 192.168.129.28 11
> (UNKNOWN) [192.168.129.28] 11 (systat) : Connection refused
> root@fw1:~# nc 192.168.129.28 11
> (UNKNOWN) [192.168.129.28] 11 (systat) : Connection refused
> root@fw1:~# nc 192.168.129.28 11
> (UNKNOWN) [192.168.129.28] 11 (systat) : Connection refused
>
> 23:11:11.896126 IP 192.168.129.2.37839 > 192.168.129.28.11: S
> 23:11:12.146573 IP 192.168.129.2.37840 > 192.168.129.28.11: S
> 23:11:12.396488 IP 192.168.129.2.37841 > 192.168.129.28.11: S
> --- cut here ---
>
>
> --- cut here ---
> root@fw1:~# nc -s 192.168.129.2 192.168.129.28 11
> (UNKNOWN) [192.168.129.28] 11 (systat) : Connection refused
> root@fw1:~# nc -s 192.168.129.2 192.168.129.28 11
> (UNKNOWN) [192.168.129.28] 11 (systat) : Connection refused
> root@fw1:~# nc -s 192.168.129.2 192.168.129.28 11
> (UNKNOWN) [192.168.129.28] 11 (systat) : Connection refused
>
> 23:11:31.704391 IP 192.168.129.2.57204 > 192.168.129.28.11: S
> 23:11:34.400048 IP 192.168.129.2.14512 > 192.168.129.28.11: S
> 23:11:34.606707 IP 192.168.129.2.20117 > 192.168.129.28.11: S
> --- cut here ---
>
> Best regards,
>
> Krzysztof Olędzki
It is a expected side effect. The starting point for the search
is based on hash(srcaddr, dstaddr, dstport, secret).
You are using same source, dest and port so yes it will stay
the same until rekeying occurs.
The secret only changes every 5min same as TCP initial sequence number.
--
Stephen Hemminger <shemminger@linux-foundation.org>
next prev parent reply other threads:[~2007-10-17 22:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 21:15 TCP port randomization Krzysztof Oledzki
2007-10-17 22:08 ` Stephen Hemminger [this message]
2007-10-17 22:31 ` Krzysztof Oledzki
2007-10-17 22:34 ` Stephen Hemminger
2007-10-18 10:29 ` Krzysztof Oledzki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071017150818.0e878846@freepuppy.rosehill \
--to=shemminger@linux-foundation.org \
--cc=netdev@vger.kernel.org \
--cc=olel@ans.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox