Skip to content

Instantly share code, notes, and snippets.

@Anachron
Created September 2, 2014 19:32
Show Gist options
  • Select an option

  • Save Anachron/368ca675766c3c292c53 to your computer and use it in GitHub Desktop.

Select an option

Save Anachron/368ca675766c3c292c53 to your computer and use it in GitHub Desktop.
Firewall Rules
# Reset all rules
sudo ufw reset --force
# DNS Requests
sudo ufw allow out 53/udp
# HTTP, HTTPS, SMTP, IMAP
sudo ufw allow out 80,443,587,993/tcp
# Instant Messaging
sudo ufw allow out 6667,1863,5222,5223,8010/tcp
# Enable rules
sudo ufw enable
# VOIP & file transfers
sudo ufw allow out 6891:6900,6901/udp
sudo ufw allow out 6891:6900,6901/tcp
# Last rule: Blocks connections not allowed in rule set
sudo ufw deny in to any
# Restart
sudo ufw disable && sudo ufw enable
# Show rules
sudo ufw status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment