Last active
December 29, 2022 14:03
-
-
Save subhendu-de/9056a60c8147343db141a26c49db1771 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Install the ufw service | |
sudo apt install ufw | |
# Add the port 3389 and 22 to the firewall | |
sudo ufw allow from <source-machine-ip> to any port 3389 | |
sudo ufw allow from <source-machine-ip> to any port 22 | |
# Refresh the firewalld service | |
sudo ufw disable | |
sudo apt enable | |
# Display the firewall status | |
sudo ufw status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment