Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SSH connection close unexpectedly

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 3.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      czappi
      last edited by

      I Have follow problem with my Wrap when i use shell over SSH the connection unexpectedly close connection.
      the pftop over ssh work without disconnect.

      1 Reply Last reply Reply Quote 0
      • D
        darrendavid
        last edited by

        I'm getting the same issue now as well. However, I have narrowed the problem to: connecting from within my LAN to ssh on an external IP that is portforwarded to inside the LAN. Basically I'm portforwarding 1.2.3.5:22 (WAN, aliased IP)  to 10.0.1.10:22. When I connect to 1.2.3.5:22 from an internal client, say, 10.0.1.100, the connection lasts all of about 5 seconds before shutting down. However, if I connect directly to 10.0.1.10:22, the connection is stable. Could this be an issue with NAT reflection?

        thanks,
        darren

        1 Reply Last reply Reply Quote 0
        • S
          sullrich
          last edited by

          @darrendavid:

          I'm getting the same issue now as well. However, I have narrowed the problem to: connecting from within my LAN to ssh on an external IP that is portforwarded to inside the LAN. Basically I'm portforwarding 1.2.3.5:22 (WAN, aliased IP)  to 10.0.1.10:22. When I connect to 1.2.3.5:22 from an internal client, say, 10.0.1.100, the connection lasts all of about 5 seconds before shutting down. However, if I connect directly to 10.0.1.10:22, the connection is stable. Could this be an issue with NAT reflection?

          thanks,
          darren

          No, its not related to NAT reflection.  Turn on keep-alives on your SSH client.

          1 Reply Last reply Reply Quote 0
          • D
            darrendavid
            last edited by

            wonderful, that fixed it. For my own edification, tho, what does pfsense do from a configuration standpoint that requires keep-alives? I've never needed them before in any other pf-based firewall config.

            thanks for the quick response,
            darren

            1 Reply Last reply Reply Quote 0
            • S
              sullrich
              last edited by

              You can also change the optimization level in System -> Advanced.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.