CyberPanel Gets Hacked Frequently

CyberPanel Gets Hacked Frequently.

All kep all port open on aws security tab. What should i do shall i close all open port?

If yes what ports i need to keep open?

Typical TCP in ports:
21,22,25,53,80,110,995,143,443,465,587,993,995,2376,2812,7080,8090,40110:40210,61208

Typical TCP out ports:
20,21,22,25,43,53,80,110,113,443,587,993,995,2376,2812,7080,8080,8090,40110:40210

Typical UDP in ports:
20,21,53,80,443

Typical UDP out ports:
20,21,53,113,123,443,33434:33523

Common DNS, ssh, smtp, http, https, mail ports +
7080 is for OLS
8090 is for Cyberpanel
2376 is for secure Docker client communication
2812 is for monit
8080 [cannot remember why I opened that one, may be related to docker too]
61208 is for glances