How to restrict Kernel RST flag - to stop closing socket

How can I restrict the RST flag raised from the kernel to the connected port?
I used ports 65000 and 65001 to receive input from the clients connected. There are ideal scenarios ie: no data from client to server. In that situation server raised an RST flag and closed the connection. I need to prevent this and my connection should continue throughout the client’s lifetime.

Are you sure it’s the server that’s doing this and not an intermediate router or firewall? It’s especially common for home routers to drop idle connections to keep the NAT table small.

From the client it looks like the server is sending an RST, but it’s not the server doing it.

See, for example, SSH keeps disconnecting · Ramblings of a Unix Geek where I explain how to configure ssh to work around this.

Yes. it is from the server side itself.
I tested using a tcpdump and confirmed that the issue is on the server side.
Also, the same server which is working in CentOS 7 is not making any issues.
How can I restrict the RST flag?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.