Firewall (UFW) — OpenClaw Glossary
A network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. UFW (Uncomplicated Firewall) is the default firewall tool for Ubuntu.
On this page
Firewall ek security guard ki tarah hota hai jo decide karta hai ki aapke server ke andar kaunsa internet traffic aa sakta hai. Ubuntu mein UFW sabse common firewall hai jo unwanted hackers ko aapke server tak pahunchne se roktahai.
What is a Firewall (UFW)?
A firewall acts as a barrier between your server and the public internet. It inspects all network traffic trying to enter or leave your server and blocks anything that hasn’t been explicitly allowed.
UFW (Uncomplicated Firewall) is a program included with Ubuntu that makes it easy to manage these rules. Instead of writing complex iptables commands, UFW lets you allow or block traffic with simple commands like ufw allow 22 or ufw deny 80.
Why it matters for OpenClaw
When you run an OpenClaw Gateway on a VPS, it is connected to the internet 24/7. Automated bots and malicious scanners constantly probe every public IP address looking for open ports and vulnerable services.
Your firewall is your first line of defense. A correctly configured UFW will block all incoming traffic by default, only allowing traffic on ports you specify (like port 22 for SSH). This means even if your OpenClaw Gateway accidentally binds to a public IP address, scanners cannot reach it.
Common mistake
Running sudo ufw allow 18789.
When beginners cannot access the OpenClaw dashboard, they often assume the firewall is the problem and run sudo ufw allow 18789. This is a massive security risk. It opens port 18789 to the entire internet, allowing anyone to access your Gateway, view your logs, and potentially use your AI agent.
Fix: Never open port 18789 on your firewall. If you need to access the dashboard, use an SSH Tunnel instead. If you must expose the Gateway publicly, do it through a secure Reverse Proxy with TLS and authentication.
Related guides
ClawReady.in is an independent educational resource and setup service. It is not affiliated with, endorsed by, or operated by OpenClaw.