1. Install iptables in the ubuntu system and set up the ip whitelist.
2. Is there any difference between this way of setting the whitelist and the whitelist function using Cloud Shield in Alibaba Cloud?
3. How to set it in iptables? Which ports specifically need to be opened?
If the server system is compared to your home, then iptables is the door of your home, and Alibaba Cloud's Cloud Shield is the security of the property.
The firewall prohibits all types of connections by default, and allows whatever is needed.
iptbales will consume server resources and become a burden if the traffic is too high. Alibaba Cloud's Cloud Shield is relatively more powerful. It is recommended to turn off the system's iptables and use Cloud Shield. Of course, you can also use both, that is It's a little more cumbersome to set up.
iptbales prohibits all connections by default. Generally, ports 22 (ssh) and 80 (http) are opened, depending on your business needs.