How to allow only your IP to access your entire server Using UFW
How to allow only your IP to access your entire server Using UFW (firewall – easiest and fastest for Ubuntu/Debian)
If you don’t have UFW installed yet:
sudo apt install ufw
Reset all firewall rules (optional but clean):
sudo ufw reset
Set default rules to block everything:
sudo ufw default deny incoming sudo ufw default allow outgoing
Allow your IP ONLY:
sudo ufw allow from YOUR_IP_ADDRESS
Allow SSH (for you only) (assuming you connect via SSH on port 22):
sudo ufw allow from YOUR_IP_ADDRESS to any port 22 proto tcp
Enable the firewall
sudo ufw enable
Disable the firewall
sudo ufw disable

Share with your friends:
How to allow only your IP to access your entire server Using UFW
How to allow only your IP to access your entire server Using UFW (firewall – easiest and fastest for Ubuntu/Debian) […]
April 9, 2025
Web Hosting Server: When and Why It’s the Right Choice
The right London web hosting ensures your website, small personal blog, or large enterprise thrives in all aspects of UK […]
September 29, 2024
Web Hosting for Small Businesses: A Mid-Range Solution for Growing Businesses
Small businesses need to have a strong online presence in the world of technology today. As you scale your business, […]
September 29, 2024
Reseller Hosting: Benefits and Considerations
The web hosting industry is increasingly transforming into a cornerstone for today’s internet infrastructure. Nowadays, where businesses and individuals are […]
September 29, 2024
Digital Marketing Toolkit
Get Free Access to Digital Marketing Toolkit. You can use all our tools without any limits
Get Free Access Now