Post by Gunther FI agree with you so I will clear it all up below by calling it "49152".
Referring to something by it's value doesn't really help.
Post by Gunther FWe're all frustrated but the question is really this simple as I see it.
Q: Is "49152" being sent to the news server or not?
Assuming that 49152 is the port that stunnel is listening on and that
the news reader is connecting to:
No, the /news/ server does not see the port 49152. (Unless fate is
being cruel to you and happens to pick 49152 out of the 65535 possible
ports to stunnel uses as it's source port when talking to the news server.
Yes, the /stunnel/ server does see the port 49152.
Post by Gunther FI'm so confused by all the helpful answers that I'm about to give up.
Please don't give up.
I get the impression that you are close to understanding.
Post by Gunther FIt's really a simpler question than it's being made out to be.
It both is and is not.
Post by Gunther FThere are two huge basic problems I see which makes this confusing.
The first is I don't know what YOU want me to call the specific port.
I'll try explaining something another way.
The news reader has an IP (192.0.2.1) and a port (11111) that it uses to
talk to the stunnel server.
A
stunnel /server/ has an IP (192.0.2.22) and a port (22222) that it uses
to talk to the news reader.
stunnel /client/ has an IP (198.51.100.33) and a port (33333) that it
uses to talk to the news server.
B
The news server has an IP (203.0.113.44) and a port (44444) thatit uses
to talk to the stunnel client.
Below are the IPs and ports for each of the connections.
A) news reader sends to the stunnel server / stunnel server receives
from the news reader:
- source IP 192.0.2.1
- source port 11111
- destination IP 192.0.2.22
- destination port 22222
B) stunnel client sends to the news server / news server receives from
the stunnel client:
- source IP 198.51.100.33
- source port 33333
- destination IP 203.0.113.44
- destination port 44444
C) news server sends to the stunnel client / stunnel client receives
from the news server:
- source IP 203.0.133.44
- source port 44444
- destination IP 198.51.100.33
- destination port 33333
D) stunnel server sends to news reader / news reader receives from
stunnel server:
- source IP 192.0.2.22
- source port 22222
- destination IP 192.0.2.1
- destination port 11111
A, B, C, and D are all disparate and independent packets each with their
own source IP, source port, destination IP and destination port.
A and D are effectively mirrors of each other as A is the request and D
is the reply for the same singular connection between the news reader
and the stunnel server.
B and C are effectively mirrors of each other as B is the request and C
is the reply for the same singular connection between the stunnel client
and the news server.
With this in mind, 49152 is the port that stunnel is listening on. So
when talking about the traffic between the news reader and the stunnel
server, it depends on which direction the traffic is going. If the
traffic is going from the news reader to the stunnel server, then 49152
is the destination port. If the traffic is going from the stunnel
server to the news reader, then 49152 is the source port.
Post by Gunther FAnd the other is that this port question is really a very simple one.
No, the question really isn't as simple as you want it to be. "It
depends." is the simple answer.
Post by Gunther FIt's not supposed to be a complicated question.
Does the news server (which talks to the stunnel client) see any details
about the connection between the news reader and stunnel server, no, it
should not.
The news server MUST see all of the details to be able to talk to the
stunnel client.
Post by Gunther FMaybe the server sees port "49152"; maybe it doesn't.
Which server? ;-)
I'll answer as if you are referring to the news server.
The news server sees the port that the stunnel client is using. There
is (less than) a 1 in 65535 chance that the stunnel client will use
49152 as it's port.
- source port when the stunnel client sends to the news server
- destination port when the news server sends to the stunnel client.
Post by Gunther FIt's really that simple of a question of maybe that unique specific
"49152" port is sent over to the server in the clear or maybe it's
never even sent.
As I tried to indicate in a reply, the very nature of TCP absolutely
*REQUIRES* that the IPs /and/ port be sent. What's more is that when
using TLS, the encryption does not protect the port, so the ports are in
the clear.
Post by Gunther FI still don't know the answer to that (which is the original) question.
If I use the example already given, I can refer to that port as "49152".
No, you can't just refer to something as port 49152 and have it mean
anything to people. Especially people that don't have the context of
this thread.
There are some ports that are well known; e.g. 80, 443, 22, 25, etc.
These ports are common ports that web, ssh, and smtp /servers/ use.
Since they are well known, that common knowledge brings some context
along with them and you may get away with being less precise.
In your example, your question is involving four different IP+port
pairs, all of which can be source and destination (different things
depending on the direction of traffic flow).
As such, you need to be more specific and better describe what you are
asking about.
Post by Gunther FThe newsreader actually isn't involved as far as I can tell, so I'm
going to _remove_ teh newsreader from this since sTunnel is doing
all the work.
If you're removing the newsreader, then you are also effectively
removing port 49152 from the discussion. Which means that you are
/only/ talking about the traffic between stunnel client and the news
server. So traffic B and C above.
Post by Gunther FI realize you're trying to help, but I confused all of you with too
much information so the question is re-stated boiled to the basic
essentials.
But you can't just boil things down.
Post by Gunther FThe question is (and always was) really this super simple as I see it.
You have blinders on and are missing lots of other things in play that
are quite germane.
Post by Gunther FQ: Is "49152" being sent to the news server or not?
As you have used it, 49152 is a port between the news reader and the
stunnel server. It has nothing to do with the connection between the
stunnel client and the news server.
I believe that you have all the information that you need, and direct
answers to this question multiple places in this thread.
You need to spend a little bit of time to understand the information
that people have provided to you.
--
Grant. . . .