SSH connection close unexpectedly



  • 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.



  • 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



  • @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.



  • 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



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


Log in to reply