- Documentation
Elastic Compute Service
Elastic Compute Service
Troubleshooting
Network connection issue
Enabling or disabling the system firewall on a Linux instance
Network connection issue
Enabling or disabling the system firewall on a Linux instance
Enabling or disabling the system firewall on a Linux instance
This topic describes how to enable or disable the system firewall on a Linux instance.
- A firewall is a technology that builds a relatively isolated protective barrier between the internal network and external network of a computer (instance), thereby protecting data and information.
- If the instance has the firewall enabled and has configured rules to block external access, remote connection to the instance may fail.
Prerequisites
To modify the configuration or data of an instance, we recommend that you create a snapshot to improve fault tolerance and ensure data security. Procedure
- Commands to enable or disable the firewall vary based on the Linux system version. Select the corresponding command for your system.
- In Debian systems, you can clear a firewall policy to delete the related blocking rule. The steps are as follows:
- Execute the following commands in sequence to back up the firewall policy.
tip
[$Iptables] is the backup file address of a firewall policy. Before you clear the firewall policy, back up the policy first.
- Execute the following command to clear the firewall policy.
Last updated: 2026.06.18 17:49:51