Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6779833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:26:05+00:00 2026-05-26T16:26:05+00:00

This is really a newbie question regarding TCP Communication. Is TCP Communication a 2-way

  • 0

This is really a newbie question regarding TCP Communication.

Is TCP Communication a 2-way communication?

Let me give a scenario:
One program is listening to a TCP port, say port 25. An external program connects to the first program’s IP address (port 25) with a random outgoing port, say port 45000

Since the first program is just listening, does that mean that

  1. The first program can only receive data and not send back any data through Port 25?
  2. If it can send data, what protects the second computer’s outgoing port 45000 from malicious attacks from the first program through port 25? As I know correctly, Firewalls are only for Incoming Ports.

Any replies are highly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:26:05+00:00Added an answer on May 26, 2026 at 4:26 pm

    TCP is always 2-way. There is no ‘send and forget’ as with UDP. The first Program would have to open a Server Socket. This means, that it listens on port 25 for a TCP SYN (A flag, that signals that a connection is being opened). If your second program connects on port 25 (from port 45000), that connection is identified by 4 values, IP of your host, Port of your host, IP of the remote host, Port of the remote host. At this moment, where the 3-Way handshake (SYN, SYN ACK, ACK) is done, the first program gets a client socket from the server socket returned, which is connected to your second program. So yes, as soon as the connection is made, it is a 2-way communication and you are vulnerable.

    Firewalls mostly block incoming traffic. If your first program was behind a firewall, and had not configured the firewall correctly, the firewall would drop the SYN-Packets from the second program. No connection would be made. A firewall can also check outbound connections, if configured correctly.

    As I said. As soon as you have connected to the remote program, the remote program gets a client socket, just like your local program, through which all communication is done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry fot his newbie question. But I really need a start on this one.
This is probably a really newbie question (well, I'm pretty sure it is), but
This is probably a really stupid newbie-sounding question to you developer type people, but
I'm really new to VSTO so sorry if this is a newbie question. I'm
I'm really new at network-programming, so I hope this isn't a complete Newbie-question. I
This is a really newbie question. I've managed to get some jQuery stuff running
This is really a dumb newbie question, but I am still learning the ropes
(This is really a newbie question about Rake & Rails & dependencies in general.
this is a really newbie question: How can I output XML with Spring MVC,
this is really a newbie question, but it would help me to have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.