If you setup your origin server in Alibaba Cloud, you can configure security group for origin server which you can control inbound and outbound ports on origin server. Here are the best practices of security group, https://www.alibabacloud.com/help/doc-detail/51170.htm