Last active
September 5, 2017 15:30
-
-
Save hotfix31/bacbb3240859120a148c9d56302e3b95 to your computer and use it in GitHub Desktop.
Pour se protéger des VPN (openvpn) pro qui autorisent le client-to-client.
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 | |
[ "$script_type" ] || exit 0 | |
[ "$dev" ] || exit 0 | |
case "$script_type" in | |
up) | |
iptables -A OUTPUT -i $dev -j ACCEPT | |
iptables -A INPUT -i $dev -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -i $dev -j DROP | |
;; | |
down) | |
iptables -D OUTPUT -i $dev -j ACCEPT | |
iptables -D INPUT -i $dev -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -D INPUT -i $dev -j DROP | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Il suffit de placer dans votre config openvpn les options :