Last active
March 14, 2021 16:19
-
-
Save imasimali/82d3c568f17d1423013662fc01d80133 to your computer and use it in GitHub Desktop.
Ubuntu Uncomplicated Firewall (ufw) rules to allow specific IP addresses to access VNC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## allow ssh connections (otherwise you will lock yourself out) | |
sudo ufw allow 22/tcp | |
## allow VNC connections from one IP address (edit the port if you don't use 5901) | |
sudo ufw allow from 12.34.56.78/24 to any port 5901 | |
## reject all other incoming connections | |
sudo ufw default reject incoming | |
## enable the firewall | |
sudo ufw enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment