Created
January 13, 2017 13:22
-
-
Save n1mh/0f3aa2b3cbec03f788755aa3714bad43 to your computer and use it in GitHub Desktop.
ufw deny outgoing connections
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 | |
UFW="sudo ufw" | |
$UFW --force reset | |
$UFW default allow incoming | |
$UFW default deny outgoing | |
$UFW deny out on eth0 | |
$UFW allow from 192.168.1.0/24 | |
$UFW allow ssh | |
$UFW allow http | |
$UFW allow https | |
$UFW --force enable | |
$UFW logging off | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment