Updated on 2026-01-31 GMT+08:00

Disabling the Firewall

Scenario

Disable the firewall on the VM. The firewall prevents the remote login in SSH mode.

Procedure

Run the following command to disable the firewall:

ufw disable

If ufw is unavailable, download it from the official website (for example, https://packages.ubuntu.com/) and install it.

The .deb installation package is as follows (the version number is for reference only):

ufw_0.35-0ubuntu2_all.deb

Alternatively, after configuring apt sources in Installing Cloud-Init, run the apt-get install ufw command to install it and then run the ufw disable command to disable the firewall.