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

  • Home
  • SEARCH
  • 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 1008779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:49:26+00:00 2026-05-16T08:49:26+00:00

Scenario: 2 network devices, each on separate private LANs. The LANs are connected by

  • 0

Scenario: 2 network devices, each on separate private LANs. The LANs are connected by public Internet.

Device on network A is listening on a socket; network A firewall has NAT port forward setup for external access from network B’s port range.

Device on network B makes outgoing connection to network A to connect to the listen socket.

Is there any difference in vulnerability of short-term connection made for a data transfer then dropped when complete (e.g. few seconds), and a persistent connection which employs a keep-alive mechanism and reconnects when dropped (hours, days, ..)?

The security of actually making the connection is not part of my question.

  • 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-16T08:49:27+00:00Added an answer on May 16, 2026 at 8:49 am

    the client will maintain a persistent connection to server

    No such thing exists.

    Each connection — no matter how long it’s supposed to last — will eventually get disconnected. It may be seconds before the disconnect or centuries, but it will eventually get disconnected. Nothing is “persistent” in the sense of perpetually on.

    There is no such thing as a “keep-alive mechanism”. It will get disconnected.

    “Assume the server authenticates the client upon connection”. Can’t assume that. That’s the vulnerability. Unless you have a secure socket layer (SSL) to assure that the TCP/IP traffic itself is secure. If you’re going to use SSL, why mess around with “keep-alive”?

    When it gets disconnected, how does it get connected again? And how do you trust the connection?

    Scenario One: Denial of Service.

    1. Bad Guys are probing your socket waiting for it to accept a connection.

    2. Your “persistent” connection goes down. (Either client crashed or you crashed or network routing infrastructure crashed. Doesn’t matter. Socket dead. Must reconnect.)

    3. Bad Guys get your listening socket first. They spoof their IP address and you think they’re the client. They’re in — masquerading as the client.

    4. The client host attempts their connection and you reject it saying they’re already connected.

    Indeed, this is the exact reason why folks invented and use SSL.

    Based on this, you can dream up a DNS-enabled scenario that will allow Bad Guys to (a) get connected and then (b) adjust a DNS entry to make them receive connections intended for you. Now they’re in the middle. Ideally, DNS security foils this, but it depends on the client’s configuration. They could be open to DNS hacks, who knows?

    The point is this.

    Don’t Count On A Persistent Connection

    It doesn’t exist. Everything gets disconnected and reconnected. That’s why we have SSL.


    The client can simply reconnect, the server must respond to the user request with the appropriate error.

    False. The client cannot “simply” reconnect. Anyone can connect. Indeed, you have to assume “everyone” is trying to connect and will beat the approved client.

    To be sure it’s the approved client you have to exchange credentials. Essentially implementing SSL. Don’t implement your own SSL. Use existing SSL.


    would they have to break into a switch site?

    Only in the movies. In the real world, we use packet sniffers.

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

Sidebar

Related Questions

Here's the scenario: A client machine has connected to the 'Work network' via VPN
There is a scenario where an application tells a device on a network to
I'm using a (Java) TCP socket to connect to a network-enabled device. Think about
I've this scenario, a Debian box running with multiple network cards: eth0 - Internet
Scenario: I have a console application that needs to access a network share with
Consider the following szenario: 2 different network-ports via boost::asio each in its own thread
I have a small doubt regarding network connection procedure in Android. My scenario is
Our scenario is a network scanner. It connects to a set of hosts and
Scenario. I have a client with two network connections to a server. One connection
I have a simple scenario, where two servers are connected through a gigabit link.

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.