Skip to content

VPS: Managing the Firewall on Linux

Learn how to configure a firewall to secure your server and allow the external connections you need β†’ Find out more

10 November 20264 min read0 Views0 helpful

Introduction

Many services and programs require you to allow external connections. The best way to do this is to set up a firewall.
In this guide, you'll learn how to configure a firewall and allow these connections.

FAQ

Frequently asked questions

UFW and IPTables. The guide starts with UFW because it's easier to set up and manage.
Run 'sudo apt install ufw'.
Run 'sudo ufw default deny incoming' and 'sudo ufw default allow outgoing'. Then explicitly allow SSH and any other required ports (e.g., 'sudo ufw allow 22') before enabling UFW.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 Users found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product β€” briefly describe your issue and we'll help you personally.