As per your query, the issue with the option: “Accept connection only from the ePO server”. is enabled from the Agent general policy.
Uncheck the option and eforce the policies and try again.
Attached the screenshot from the Agent general policy as below.
Agent General policy.PNG 35.7 K
Thanks alot it is working fine now