Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- interface=eth2
- iptables -F
- iptables -P INPUT DROP
- iptables -P OUTPUT DROP
- iptables -P FORWARD DROP
- echo "Allow outbound DNS"
- iptables -A OUTPUT -p udp -o $interface --dport 53 -j ACCEPT
- iptables -A INPUT -p udp -i $interface --sport 53 -j ACCEPT
- echo "block www.umcs.lublin.pl == 87.246.208.9"
- iptables -A OUTPUT -o $interface -p tcp -d 87.246.208.9 -j DROP
- echo "block umcs.pl == 87.246.208.14"
- iptables -A OUTPUT -o $interface -p tcp -d 87.246.208.14 -j DROP
- echo "allow outbound 80,8080,443 (http, https)"
- iptables -A OUTPUT -o $interface -p tcp --match multiport --dports 80,8080,443 -j ACCEPT
- iptables -A INPUT -i $interface -p tcp --match multiport --sports 80,8080,443 -j ACCEPT
- echo "done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement