Security Configuration
To ensure successful host connectivity, configure the host as follows:
- If your host is a newly applied cloud host, configure the port by referring to Configuring a Security Group.
If you have your own host, configure the port by referring to Configuring the Firewall.
- If you have high requirements on the security of the overall deployment process, you can configure the IP address blacklist and whitelist for the host.
Configuring a Security Group
Before verifying host connectivity, configure a security group and enable some ports. Otherwise, the connectivity verification may fail. (The following uses a Linux host as an example.)
- Go to the console. In the upper left corner of the page, choose Service List > Compute > Elastic Cloud Server. The Elastic Cloud Server page is displayed.
- Click the target ECS. On the ECS details page, click the Security Groups tab. Click the security group ID. On the page that is displayed, click the Inbound Rules.
- Click Fast-Add Rule and set the parameters as follows:
- For Linux hosts, enable port 22 in the inbound rule. For Windows hosts, enable ports 54, 5985, and 5986 in the inbound rule when adding the target host or proxy host. Set the remote end to 0.0.0.0/0 (open the preceding ports for all IP addresses).
- Remove the inbound restriction on the port of the application deployed on the host (for example, port 8080 of the Tomcat application or all ports of other applications must be enabled in the inbound direction). Otherwise, the application cannot be accessed.
- Remove the restriction on the outbound direction or at least make ports 80 and 443 accessible.
Configuring the Firewall
Check the firewall configuration of the host and configure the firewall to allow the SSH protocol port to be accessed. Otherwise, the connectivity verification fails. The following part describes how to configure the firewall for different operating systems.
Linux Firewall Configurations
OS Series |
Configuration Method |
---|---|
CentOS/EulerOS/UnionTechOS |
|
Debian |
|
Ubuntu |
|
Windows Firewall Configurations
This section uses Windows Server 2012 as an example.
- Choose Windows Firewall on the control panel of the Windows host.
- Click Advanced settings.
- Click Inbound Rules.
- Click New Rule.
- Set Rule Type to Port and click Next.
- Select TCP and Specific local ports, enter port 5986, and click Next.
- Select Allow the connection, and click Next.
- Select all the options for Profile and click Next.
- Enter a rule name and click Finish.
Configuring the IP Address Blacklist and Whitelist
You can add IP addresses to the firewall whitelist and check whether these IP addresses are blocked by the firewall for security purposes in the scenario where the official resource pool is used.
Commands related to the IP address whitelist
- Check whether there are blocked IP addresses:
vi /var/log/secure
- Check whether the preceding IP addresses are blocked by the host. If yes, run the following command to remove the restriction:
vi /etc/hosts.deny
- Add required IP addresses to the whitelist. Example:
vi /etc/hosts.allow sshd:***.***.***.***:allow #Use the IP address to be added to the whitelist.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.