Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #politque par defaut
- iptables -P INPUT DROP
- iptables -P FORWARD DROP
- iptables -P OUTPUT DROP
- # creation chaine TCP IN OUT
- iptables -N TCPIFG
- iptables -N TCPOFG
- iptables -A OUTPUT -p tcp -j TCPOFG
- iptables -A INPUT -p tcp -j TCPIFG
- #creation chaine UDP IN OUT
- iptables -N UDPIFG
- iptables -N UDPOFG
- iptables -A OUTPUT -p udp -j UDPOFG
- iptables -A INPUT -p udp -j UDPIFG
- # autoriser 22 et 21
- iptables -A TCPIFG -p tcp --dport 21 -j ACCEPT
- iptables -A TCPIFG -p tcp --dport 22 -j ACCEPT
- # Permerttre retour
- iptables -A TCPIFG -m state --state RELATED,ESTABLISHED -j ACCEPT
- iptables -A TCPOFG -m state --state RELATED,ESTABLISHED -j ACCEPT
- #Autoriser dns
- iptables -A UDPIFG -p udp --dport 53 -j ACCEPT
- iptables -A UDPOFG -p udp --sport 53 -j ACCEPT
- #bloque microsoft
- iptables -A TCPIFG -p tcp -m multiport --dports netbios-ns,netbios-dgm,netbios-ssn,microsoft-ds,bootps,bootpc -j DROP
- iptables -A UDPIFG -p udp -m multiport --dports netbios-ns,netbios-dgm,netbios-ssn,microsoft-ds,bootps,bootpc -j DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement