SSH dropped after 25 seconds when through a firewall

Hi,

I have three sections to my network, each connecting to their own NIC in a pfSense gateway.

One section is private, two are for the public to access the internet through.
I have firewall rules on the pfSense gateway to block traffic coming from the public sections into the private one, but traffic going out to the public sections is allowed.

Observations:

  1. I can SSH from the private section into PC’s in the public sections without issue.

  2. I can SSH into my new MikroTik RouterBoard 750 (OS ver. 5.26) and mAP2n (OS ver. 6.15) boxes, but after about 25-30 seconds the terminal session just hangs, regardless of whether I’m actively using it or not. I’m assuming this is the connection being dropped by the box.

  3. If I SSH into the RouterBoards from within their network section the connection is fine and stays up as long as needed.

So with all the evidence above, it looks to me like there is a setting in the RouterOS that is not compatible with running through the firewall. I wonder if it’s sending out some type of ping to the client, and when it gets no reply it assumes the client is gone and drops the connection, despite the fact that I’m using it.

Any ideas would be greatly appreciated,
Colin :smiley:

I just realised my initial post wasn’t entirely correct…

It seems that SSH’ing to my two L2TP+EoIP VPN tunnel server routers (RB750’s) is fine, it’s only the clients that drop SSH after 25 seconds.

I’m SHH’ing to the clients through the firewall and the VPN tunnel. maybe I should just allow SSH through the router’s WAN port and go direct. …the VPN tunnels are running inside the LAN, segregating public computers from the LAN, so it would safe enough.

Any ideas on the cause of the issue though?