Skip to content

Secure Your VPS: Setup Firewall

View on Twitter

💡 Using a firewall to block incoming traffic on non-public ports is an essential part to securing a VPS:

➡️ ufw default deny incoming
➡️ ufw allow ssh
➡️ ufw allow http
➡️ ufw allow https
➡️ ufw enable

Setting up a firewall with ufw in Ubuntu by blocking all incoming traffic except SSH, HTTP & HTTPS.

Download the VPS Security Cheatsheet

Use this FREE security cheatsheet to not miss a step when securing your VPS.

A preview of the VPS Security Cheatsheet.

You'll also get tips on building scalable Node.js applications about twice a month. I respect your email privacy. Unsubscribe any time.

You might also like
Add Public Key to Server With ssh-copy-id Read tip
Secure Your VPS: Use Non-Root User Read tip
A Better Minimum Compression Size in Nginx Read tip