Skip to content

Instantly share code, notes, and snippets.

@subhendu-de
Last active December 29, 2022 14:03
Show Gist options
  • Save subhendu-de/9056a60c8147343db141a26c49db1771 to your computer and use it in GitHub Desktop.
Save subhendu-de/9056a60c8147343db141a26c49db1771 to your computer and use it in GitHub Desktop.
#!/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