🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.free.newsservers
19 messages
19 total messages Started by Clément Mon, 09 Nov 2015 03:19
Does mixmin know the PORT that we use at home?
#161045
Author: Clément
Date: Mon, 09 Nov 2015 03:19
4 lines
975 bytes
If I use port 1234 with news.mixmin.net, does the mixmin server 
*know* that specific port number on my side?

Or does mixmin just see the traffic and not the port?
Re: Does mixmin know the PORT that we use at home?
#161040
Author: Steve Crook
Date: Mon, 09 Nov 2015 09:16
19 lines
1495 bytes
On Mon, 9 Nov 2015 03:19:57 +0000 (UTC), Clément wrote in
Message-Id: <n1p3cs$idt$1@speranza.aioe.org>:

> If I use port 1234 with news.mixmin.net, does the mixmin server 
> *know* that specific port number on my side?
>
> Or does mixmin just see the traffic and not the port?

Mixmin would know the port number as it talks back to your client after
the connection is established.  Using netstat I can see connections like
this:

tcp fleegle.mixmin.net:nntps <client_ip>:58444 ESTABLISHED news

This info isn't logged though and usually the client-side port is
different on each connection.

-- 
And with glasses high we raised a cry for freedom had arrived
Re: Does mixmin know the PORT that we use at home?
#161042
Author: Clément
Date: Mon, 09 Nov 2015 13:45
50 lines
2272 bytes
Steve Crook wrote:

> Mixmin would know the port number as it talks back to your client after
> the connection is established.  Using netstat I can see connections like
> this:
> 
> tcp fleegle.mixmin.net:nntps <client_ip>:58444 ESTABLISHED news
> 
> This info isn't logged though and usually the client-side port is
> different on each connection.

Thanks for that information Steve.
I understand now that you can see the client-side port.

In addition, you implied the client-side port is different on each 
connection?

From your own directions, don't we normally set up stunnel to be static 
on whatever port we put into the stunnel.conf file?

 (start of Steve's nice directions )
Install Stunnel:-
$ sudo apt-get update
$ sudo apt-get install stunnel

Create a config file:-
gedit /etc/stunnel/stunnel.conf
[nntp]
client = yes
accept = 127.0.0.1:119
connect = news.mixmin.net:563

Enable Stunnel: 
vi /etc/default/stunnel4
ENABLED=1

Start Stunnel: 
/etc/init.d/stunnel4 start
 (end of Steve's nice directions )

I use port 3333 instead of port 119 (I didn't want to clash with other 
nntp clients so I picked any arbitrary high port that I could remember).

Here is my stunnel.conf file:
[nntp]
client = yes
accept = 127.0.0.1:3333
connect = news.mixmin.net:563

Given that, isn't my port to you always *static* on port 3333?
Re: Does mixmin know the PORT that we use at home?
#161044
Author: Steve Crook
Date: Mon, 09 Nov 2015 14:58
58 lines
2752 bytes
On Mon, 9 Nov 2015 13:45:51 +0000 (UTC), Clément wrote in
Message-Id: <n1q82f$mi$1@speranza.aioe.org>:

> Steve Crook wrote:
>
>> Mixmin would know the port number as it talks back to your client after
>> the connection is established.  Using netstat I can see connections like
>> this:
>> 
>> tcp fleegle.mixmin.net:nntps <client_ip>:58444 ESTABLISHED news
>> 
>> This info isn't logged though and usually the client-side port is
>> different on each connection.
>
> Thanks for that information Steve.
> I understand now that you can see the client-side port.

Hi Clément,

Actually I think we're talking about different things.  I thought you
meant the client-side port used to interact with the nntps port on my
server.  I think you're actually talking about the port on your PC that
STunnel is listening on.  These aren't the same things.

> I use port 3333 instead of port 119 (I didn't want to clash with other 
> nntp clients so I picked any arbitrary high port that I could remember).

In this usage case, your stunnel is only listening for connections on
locahost (127.0.0.1).  Nothing can connect to it except applications on
your own PC.  You could make it listen on 119 and there would be no
problem.

> Here is my stunnel.conf file:
> [nntp]
> client = yes
> accept = 127.0.0.1:3333
> connect = news.mixmin.net:563
>
> Given that, isn't my port to you always *static* on port 3333?
Absoutely right.  Your local stunnel will always listen for connections
from the local PC on port 3333.  You may also wish to try out the
following STunnel config:-


client = yes

[nntp]
protocol = nntp
accept = localhost:119
connect = news.mixmin.net:119


The newsserver supports a capability called STARTTLS.  With this recipe,
you can connect on the standard port 119 and your PC and my server will
then negotiate a secure connection.

-- 
And with glasses high we raised a cry for freedom had arrived
Re: Does mixmin know the PORT that we use at home?
#161046
Author: Clément
Date: Mon, 09 Nov 2015 15:59
28 lines
1774 bytes
Steve Crook wrote:

> Actually I think we're talking about different things.  I thought you
> meant the client-side port used to interact with the nntps port on my
> server.  I think you're actually talking about the port on your PC that
> STunnel is listening on.  These aren't the same things.

Hi Steve,
Probably I don't know enough to ask properly, but, can you clarify what 
port you can see from your server?

I'm just worried about 'identifying' information.

When I go out on my "local" port 119, how do I know what port is being 
used to connect to your server?

Is there a linux command I can run to tell?
For example, 
$ telnet news.mixmin.net 119
Trying 144.76.182.167...
Connected to fleegle.mixmin.net.
Escape character is '^]'.
200 news.mixmin.net InterNetNews NNRP server INN 2.7.0 (20151105 
prerelease) ready (posting ok)


But I don't know what to type next to see what port I'm connecting to you 
on, if it's not 119?
Re: Does mixmin know the PORT that we use at home?
#161047
Author: Michael Baeuerle
Date: Mon, 09 Nov 2015 16:30
26 lines
2038 bytes
Clément wrote:
> Steve Crook wrote:
> > 
> > Actually I think we're talking about different things.  I thought you
> > meant the client-side port used to interact with the nntps port on my
> > server.  I think you're actually talking about the port on your PC that
> > STunnel is listening on.  These aren't the same things.
> 
> Hi Steve,
> Probably I don't know enough to ask properly, but, can you clarify what 
> port you can see from your server?
> 
> I'm just worried about 'identifying' information.
> 
> When I go out on my "local" port 119, how do I know what port is being 
> used to connect to your server?
> 
> Is there a linux command I can run to tell?

Without using telnet, just with normal connection "newsreader->stunnel
->server" the command:

   netstat -n --tcp

should show what you are searching (look for the line where "Foreign
address" matches the server).
Re: Does mixmin know the PORT that we use at home?
#161050
Author: Steve Crook
Date: Mon, 09 Nov 2015 18:24
47 lines
2476 bytes
On Mon, 9 Nov 2015 15:59:00 +0000 (UTC), Clément wrote in
Message-Id: <n1qfs4$llb$1@speranza.aioe.org>:

> Steve Crook wrote:
>
>> Actually I think we're talking about different things.  I thought you
>> meant the client-side port used to interact with the nntps port on my
>> server.  I think you're actually talking about the port on your PC that
>> STunnel is listening on.  These aren't the same things.
>
> Hi Steve,
> Probably I don't know enough to ask properly, but, can you clarify what 
> port you can see from your server?
>
> I'm just worried about 'identifying' information.
>
> When I go out on my "local" port 119, how do I know what port is being 
> used to connect to your server?

When you're using stunnel, the port you connect on is indicated next to
the hostname:-
connect = news.mixmin.net:563
or:-
connect = news.mixmin.net:119

news.mixmin.net only listens for nntp connections on these two ports, if
you connect on a different port, you wouldn't see the "InterNetNews NNRP
server INN 2.7.0" banner.

> Is there a linux command I can run to tell?
> For example, 
> $ telnet news.mixmin.net 119
> Trying 144.76.182.167...
> Connected to fleegle.mixmin.net.
> Escape character is '^]'.
> 200 news.mixmin.net InterNetNews NNRP server INN 2.7.0 (20151105 
> prerelease) ready (posting ok)
>
>
> But I don't know what to type next to see what port I'm connecting to you 
> on, if it's not 119?

As your other responder suggests, you can test what hosts/ports your PC
is connected to by using netstat.

-- 
And with glasses high we raised a cry for freedom had arrived
Re: Does mixmin know the PORT that we use at home?
#161053
Author: Clément
Date: Mon, 09 Nov 2015 21:02
45 lines
2705 bytes
Michael Baeuerle wrote:

> Without using telnet, just with normal connection "newsreader->stunnel
> ->server" the command:
> 
>    netstat -n --tcp
> 
> should show what you are searching (look for the line where "Foreign
> address" matches the server).

Does the information below indicate that I'm connecting to Mixmin via 
my external ports 32898, 32899, & 32855 ?

$ telnet news.mixmin.net 119
Trying 144.76.182.167...
Connected to fleegle.mixmin.net.
Escape character is '^]'.
200 news.mixmin.net InterNetNews NNRP server INN 2.7.0 (20151105 prerelease) ready (posting ok)
Connection closed by foreign host.

$ ping news.mixmin.net
PING fleegle.mixmin.net (144.76.182.167) 56(84) bytes of data.
64 bytes from fleegle.mixmin.net (144.76.182.167): icmp_seq=1 ttl=48 time=237 ms
64 bytes from fleegle.mixmin.net (144.76.182.167): icmp_seq=2 ttl=48 time=223 ms
64 bytes from fleegle.mixmin.net (144.76.182.167): icmp_seq=3 ttl=48 time=235 ms
64 bytes from fleegle.mixmin.net (144.76.182.167): icmp_seq=4 ttl=48 time=241 ms
^C
--- fleegle.mixmin.net ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3001ms
rtt min/avg/max/mdev = 223.089/234.308/241.904/6.940 ms

While downloading a group from the mixmin server with the nntp client, run:

netstat -n --tcp 
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 10.211.1.5:32898        144.76.182.167:563      ESTABLISHED
tcp        0      0 10.211.1.5:32899        144.76.182.167:563      ESTABLISHED
tcp        0      0 10.211.1.5:32855        144.76.182.167:563      ESTABLISHED

Time will tell, but, if I understood Steve correctly, today I might be connected
to his server via these three ports 32898, 32899, & 32855, but, tomorrow, my
machine will use different ports.

Is that correct?
Re: Does mixmin know the PORT that we use at home?
#161056
Author: Steve Crook
Date: Tue, 10 Nov 2015 00:26
21 lines
1941 bytes
On Mon, 9 Nov 2015 21:02:04 +0000 (UTC), Clément wrote in
Message-Id: <n1r1kc$1r1$1@speranza.aioe.org>:

> netstat -n --tcp 
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> tcp        0      0 10.211.1.5:32898        144.76.182.167:563      ESTABLISHED
> tcp        0      0 10.211.1.5:32899        144.76.182.167:563      ESTABLISHED
> tcp        0      0 10.211.1.5:32855        144.76.182.167:563      ESTABLISHED
>
> Time will tell, but, if I understood Steve correctly, today I might be
> connected to his server via these three ports 32898, 32899, & 32855,
> but, tomorrow, my machine will use different ports.
>
> Is that correct?
Yup, absolutely correct.  Not just tomorrow, but every time you
re-establish a connection.


-- 
And with glasses high we raised a cry for freedom had arrived
Re: Does mixmin know the PORT that we use at home?
#161057
Author: Clément
Date: Tue, 10 Nov 2015 00:55
9 lines
1362 bytes
Steve Crook wrote:

> Yup, absolutely correct.  Not just tomorrow, but every time you
> re-establish a connection.

Now that I know a little more, I do see what you mean!

$ netstat -n --tcp |grep 144.76.182.167
... tcp 0 0 10.211.1.5:48187 144.76.182.167:563 ESTABLISHED
Re: Does mixmin know the PORT that we use at home?
#161069
Author: §nühw¤£f
Date: Tue, 10 Nov 2015 17:39
63 lines
3292 bytes
Steve Crook <steve@mixmin.net> wrote in
news:slrnn41p6h.n7i.steve@fleegle.mixmin.net: 

> On Mon, 9 Nov 2015 15:59:00 +0000 (UTC), Clément wrote in
> Message-Id: <n1qfs4$llb$1@speranza.aioe.org>:
> 
>> Steve Crook wrote:
>>
>>> Actually I think we're talking about different things.  I thought
>>> you meant the client-side port used to interact with the nntps port
>>> on my server.  I think you're actually talking about the port on
>>> your PC that STunnel is listening on.  These aren't the same things.
>>
>> Hi Steve,
>> Probably I don't know enough to ask properly, but, can you clarify
>> what port you can see from your server?
>>
>> I'm just worried about 'identifying' information.
>>
>> When I go out on my "local" port 119, how do I know what port is
>> being used to connect to your server?
> 
> When you're using stunnel, the port you connect on is indicated next
> to the hostname:-
> connect = news.mixmin.net:563
> or:-
> connect = news.mixmin.net:119
> 
> news.mixmin.net only listens for nntp connections on these two ports,
> if you connect on a different port, you wouldn't see the "InterNetNews
> NNRP server INN 2.7.0" banner.
> 
>> Is there a linux command I can run to tell?
>> For example, 
>> $ telnet news.mixmin.net 119
>> Trying 144.76.182.167...
>> Connected to fleegle.mixmin.net.
>> Escape character is '^]'.
>> 200 news.mixmin.net InterNetNews NNRP server INN 2.7.0 (20151105 
>> prerelease) ready (posting ok)
>>
>>
>> But I don't know what to type next to see what port I'm connecting to
>> you on, if it's not 119?
> 
> As your other responder suggests, you can test what hosts/ports your
> PC is connected to by using netstat.
> 

Try this...

netstat -lnptu

HTH

-- 
http://signon.org/sign/protect-americas-wolves
www.snuhwolf.9f.com|www.savewolves.org
    _____  ____  ____ __ /\_/\ __      _ ______   _____
   / __/ |/ / / / / // // . . \\ \ |\ | / __ \ \  \  __\
  _\ \/    / /_/ / _  / \     / \ \| \| \ \_\ \ \__\  _\
 /___/_/|_/\____/_//_/   \_@_/   \__|\__|\____/\____\_\
Re: Does mixmin know the PORT that we use at home?
#161070
Author: Clément
Date: Tue, 10 Nov 2015 23:44
14 lines
1582 bytes
§nühw€£f wrote:

> Try this...
> netstat -lnptu

That seems to tell me which LOCAL ports are connected to NNTP, right?

$ netstat -lnptu
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name           
tcp        0      0 127.0.0.1:119           0.0.0.0:*               LISTEN      -               
...
Re: Does mixmin know the PORT that we use at home?
#161071
Author: Michael Baeuerle
Date: Wed, 11 Nov 2015 09:03
35 lines
2727 bytes
Clément wrote:
> §nühw€£f wrote:
> > 
> > Try this...
> > netstat -lnptu
> 
> That seems to tell me which LOCAL ports are connected to NNTP, right?

"-l" show the *listening* sockets - such ones that are ready to
accept a connection.

"-n" is the same as in my example (shows adresses in numerical form).

"-p" shows the program name and it's process ID. It prints nothing in
your case (likely because the user that executed netstat had
insufficient permissions to acquire this information).

"-t" is the same as "--tcp" in my example (it means "show TCP sockets").

"-u" also shows UDP sockets. You can omit this here because NNTP use TCP
protocol on the transport layer.

> $ netstat -lnptu
> (Not all processes could be identified, non-owned process info
>  will not be shown, you would have to be root to see it all.)
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name           
> tcp        0      0 127.0.0.1:119           0.0.0.0:*               LISTEN      -               
                      ^^^^^^^^^^^^^
This should be the socket on the input side of stunnel (that waits for
a connection from your newsreader).

This is internal on your machine. I had understand your question in that
way, that you want to see the external connections (from your machine to
the server).
Re: Does mixmin know the PORT that we use at home?
#161075
Author: §nühw¤£f
Date: Wed, 11 Nov 2015 17:54
54 lines
3197 bytes
Michael Baeuerle <michael.baeuerle@stz-e.de> wrote in
news:AABWQvvhJioAAG6y.A1.flnews@WStation3.stz-e.de: 

> Clément wrote:
>> §nühw€£f wrote:
>> > 
>> > Try this...
>> > netstat -lnptu
>> 
>> That seems to tell me which LOCAL ports are connected to NNTP, right?
> 
> "-l" show the *listening* sockets - such ones that are ready to
> accept a connection.
> 
> "-n" is the same as in my example (shows adresses in numerical form).
> 
> "-p" shows the program name and it's process ID. It prints nothing in
> your case (likely because the user that executed netstat had
> insufficient permissions to acquire this information).
> 
> "-t" is the same as "--tcp" in my example (it means "show TCP
> sockets"). 
> 
> "-u" also shows UDP sockets. You can omit this here because NNTP use
> TCP protocol on the transport layer.
> 
>> $ netstat -lnptu
>> (Not all processes could be identified, non-owned process info
>>  will not be shown, you would have to be root to see it all.)
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address           Foreign Address        
>> State       PID/Program name           tcp        0      0
>> 127.0.0.1:119           0.0.0.0:*               LISTEN      -        
>>       
>                       ^^^^^^^^^^^^^
> This should be the socket on the input side of stunnel (that waits for
> a connection from your newsreader).
> 
> This is internal on your machine. I had understand your question in
> that way, that you want to see the external connections (from your
> machine to the server).
> 

Yep. Its either that or install Nmap...
http://insecure.org/


-- 
http://www.wolfwatcher.org
www.snuhwolf.9f.com|www.savewolves.org
    _____  ____  ____ __ /\_/\ __      _ ______   _____
   / __/ |/ / / / / // // . . \\ \ |\ | / __ \ \  \  __\
  _\ \/    / /_/ / _  / \     / \ \| \| \ \_\ \ \__\  _\
 /___/_/|_/\____/_//_/   \_@_/   \__|\__|\____/\____\_\
Re: Does mixmin know the PORT that we use at home?
#161076
Author: Clément
Date: Thu, 12 Nov 2015 02:48
47 lines
4148 bytes
Michael Baeuerle wrote:

> This should be the socket on the input side of stunnel (that waits for
> a connection from your newsreader).
> 
> This is internal on your machine. I had understand your question in that
> way, that you want to see the external connections (from your machine to
> the server).

You understood me correctly. I wanted to know what port Steve sees.

Unfortunately, I gave you a snipped output because I thought it was easier 
for you to parse, but maybe I snipped out too much.

Here is an unsnipped output, with a process running in my nntp client
to make sure that something is happening on Steve's server.

$ netstat -lnptu
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:8118          0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:119           0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:1714            0.0.0.0:*               LISTEN      2640/kdeconnectd
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 ::1:631                 :::*                    LISTEN      -               
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -               
udp        0      0 0.0.0.0:54676           0.0.0.0:*                           -               
udp        0      0 0.0.0.0:39767           0.0.0.0:*                           -               
udp        0      0 0.0.0.0:49134           0.0.0.0:*                           -               
udp        0      0 0.0.0.0:57411           0.0.0.0:*                           2640/kdeconnectd
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -               
udp        0      0 10.211.1.17:123         0.0.0.0:*                           -               
udp        0      0 192.168.1.51:123        0.0.0.0:*                           -               
udp        0      0 127.0.0.1:123           0.0.0.0:*                           -               
udp        0      0 0.0.0.0:123             0.0.0.0:*                           -               
udp        0      0 0.0.0.0:631             0.0.0.0:*                           -               
udp        0      0 255.255.255.255:1714    0.0.0.0:*                           2640/kdeconnectd
udp6       0      0 :::35796                :::*                                -               
udp6       0      0 :::13320                :::*                                -               
udp6       0      0 :::5353                 :::*                                -               
udp6       0      0 fa83::233:31fa:ae7b:123 :::*                                -               
udp6       0      0 ::1:123                 :::*                                -               
udp6       0      0 :::123                  :::*
Re: Does mixmin know the PORT that we use at home?
#161078
Author: Michael Baeuerle
Date: Thu, 12 Nov 2015 08:29
23 lines
2245 bytes
Clément wrote:
> Michael Baeuerle wrote:
> > 
> > This should be the socket on the input side of stunnel (that waits for
> > a connection from your newsreader).
> > 
> > This is internal on your machine. I had understand your question in that
> > way, that you want to see the external connections (from your machine to
> > the server).
> 
> You understood me correctly. I wanted to know what port Steve sees.
> 
> Unfortunately, I gave you a snipped output because I thought it was easier 
> for you to parse, but maybe I snipped out too much.
> 
> Here is an unsnipped output, with a process running in my nntp client
> to make sure that something is happening on Steve's server.
> 
> $ netstat -lnptu
> [output without the desired information]

As I have written before: If you specify "-l", then you don't get the
outgoing connections with the ports that the outside world can see.
Re: Does mixmin know the PORT that we use at home?
#161079
Author: Clément
Date: Thu, 12 Nov 2015 23:07
30 lines
2639 bytes
Michael Baeuerle wrote:

> As I have written before: If you specify "-l", then you don't get the
> outgoing connections with the ports that the outside world can see.

Ah, I had missed that detail. 
Thanks for the clarification.

Here are the outgoing connections that the outside world can see.

$ netstat -nptu
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:119           127.0.0.1:48093         ESTABLISHED -               
tcp        0      0 10.211.1.81:39848       144.76.182.167:563      ESTABLISHED -               
tcp        0      0 127.0.0.1:48093         127.0.0.1:119           ESTABLISHED 5952/pan        
tcp        0      0 127.0.0.1:48097         127.0.0.1:119           ESTABLISHED 5952/pan        
tcp        0      1 10.211.1.81:59448       209.197.72.47:80        SYN_SENT    7720/wget       
tcp        0      0 127.0.0.1:119           127.0.0.1:48099         ESTABLISHED -               
tcp        0      0 127.0.0.1:119           127.0.0.1:48097         ESTABLISHED -               
tcp        0      0 127.0.0.1:48099         127.0.0.1:119           ESTABLISHED 5952/pan        
tcp        0      0 10.211.1.81:39850       144.76.182.167:563      ESTABLISHED -               
tcp        0      0 10.211.1.81:39852       144.76.182.167:563      ESTABLISHED -               
tcp6       1      0 ::1:37033               ::1:631                 CLOSE_WAIT  -

From this, do I gather correctly that the port that Steve's server
sees is 48093, 48099, and 48097, or is it the ports connected to 
his port 563, which is 39850 & 39852?
Re: Does mixmin know the PORT that we use at home?
#161091
Author: Michael Baeuerle
Date: Sat, 14 Nov 2015 09:25
51 lines
4663 bytes
Clément wrote:
> Michael Baeuerle wrote:
> > 
> > As I have written before: If you specify "-l", then you don't get the
> > outgoing connections with the ports that the outside world can see.
> 
> Ah, I had missed that detail. 
> Thanks for the clarification.
> 
> Here are the outgoing connections that the outside world can see.
> 
> $ netstat -nptu
> (Not all processes could be identified, non-owned process info
>  will not be shown, you would have to be root to see it all.)
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
> tcp        0      0 127.0.0.1:119           127.0.0.1:48093         ESTABLISHED -               
> tcp        0      0 10.211.1.81:39848       144.76.182.167:563      ESTABLISHED -               
> tcp        0      0 127.0.0.1:48093         127.0.0.1:119           ESTABLISHED 5952/pan        
> tcp        0      0 127.0.0.1:48097         127.0.0.1:119           ESTABLISHED 5952/pan        
> tcp        0      1 10.211.1.81:59448       209.197.72.47:80        SYN_SENT    7720/wget       
> tcp        0      0 127.0.0.1:119           127.0.0.1:48099         ESTABLISHED -               
> tcp        0      0 127.0.0.1:119           127.0.0.1:48097         ESTABLISHED -               
> tcp        0      0 127.0.0.1:48099         127.0.0.1:119           ESTABLISHED 5952/pan        
> tcp        0      0 10.211.1.81:39850       144.76.182.167:563      ESTABLISHED -               
> tcp        0      0 10.211.1.81:39852       144.76.182.167:563      ESTABLISHED -               
> tcp6       1      0 ::1:37033               ::1:631                 CLOSE_WAIT  -
> 
> From this, do I gather correctly that the port that Steve's server
> sees is 48093, 48099, and 48097, or is it the ports connected to 
> his port 563, which is 39850 & 39852?

First delete all lines from the list where "State" ist not established:
| 
| Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
| tcp        0      0 127.0.0.1:119           127.0.0.1:48093         ESTABLISHED -
| tcp        0      0 10.211.1.81:39848       144.76.182.167:563      ESTABLISHED -
| tcp        0      0 127.0.0.1:48093         127.0.0.1:119           ESTABLISHED 5952/pan
| tcp        0      0 127.0.0.1:48097         127.0.0.1:119           ESTABLISHED 5952/pan
| tcp        0      0 127.0.0.1:119           127.0.0.1:48099         ESTABLISHED -
| tcp        0      0 127.0.0.1:119           127.0.0.1:48097         ESTABLISHED -
| tcp        0      0 127.0.0.1:48099         127.0.0.1:119           ESTABLISHED 5952/pan
| tcp        0      0 10.211.1.81:39850       144.76.182.167:563      ESTABLISHED -
| tcp        0      0 10.211.1.81:39852       144.76.182.167:563      ESTABLISHED -

Next delete all connections to your own machine (127.0.0.1):
| 
| Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
| tcp        0      0 10.211.1.81:39848       144.76.182.167:563      ESTABLISHED -
| tcp        0      0 10.211.1.81:39850       144.76.182.167:563      ESTABLISHED -
| tcp        0      0 10.211.1.81:39852       144.76.182.167:563      ESTABLISHED -
Re: Does mixmin know the PORT that we use at home?
#161100
Author: Clément
Date: Sun, 15 Nov 2015 00:12
47 lines
3261 bytes
Michael Baeuerle wrote:

> First delete all lines from the list where "State" ist not established:
> Next delete all connections to your own machine (127.0.0.1):
> | Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
> | tcp        0      0 10.211.1.81:39848       144.76.182.167:563      ESTABLISHED -
> | tcp        0      0 10.211.1.81:39850       144.76.182.167:563      ESTABLISHED -
> | tcp        0      0 10.211.1.81:39852       144.76.182.167:563      ESTABLISHED -

Thanks Michael (and Steve) for being so patient and understanding.

Ah, I see. I do. Very nice. Thank you for explaining.

So, to summarize, I now realized that, to find the port at
which *Steve* sees me connected to his machine, we can...

0. Set the Usenet client number of simultaneous connections (e.g., to 3).
1. Ensure the nntp client is doing something (e.g., refreshing groups)
2. Run netstat -nptu
   -n = Show numerical addresses 
   -p = Show the PID and name of the program to which each socket belongs.
   -t = Show tcp packets (the manpage virtually assumes you know this though)
   -u = Show udp packets (the manpage basically assumes you already know this)
3. Remove all but the ESTABLISHED connections
4. The result is:
 Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
 tcp        0      0 10.211.1.81:39848       144.76.182.167:563      ESTABLISHED -
 tcp        0      0 10.211.1.81:39850       144.76.182.167:563      ESTABLISHED -
 tcp        0      0 10.211.1.81:39852       144.76.182.167:563      ESTABLISHED -

So, what remains, tells us the ports where "Foreign Address" gives us our
local port to his server (563), and "Local Address" provides the port that 
Steve sees connected to his server (39848, 39850, & 39852).

This is interesting because, locally, I had *thought* I was using 
"internal" port 119 (localhost:119) in stunnel, but, I guess stunnel 
doesn't actually go out on 119, but on "external ports" 39852, 39850, 
& 39852. 

What was foreign to me is that I can get "to" Steve's port 563, but, 
I *use* my "external" ports 39852, 39850, & 39852 to do that. I had 
always just blindly assumed I went out on "my internal" port 563 
(or whatever port stunnel was set up to talk to, which, for me, was 
internal port 119).

It's still a bit confusing, but I can *see* what you've shown me!
Thanks.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads