/bin/laden
(usa Void Linux)
Enviado em 29/07/2011 - 09:09h
Usa esse script. Com ele vc acessará a internet normalmente e apenas as conexões que vc iniciar serão aceitas.
==========================================
#!/bin/sh
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
for i in /proc/sys/net/ipv4/conf/*
do
echo 0 > ${i}/accept_redirects
echo 0 > ${i}/accept_source_route
echo 0 > ${i}/secure_redirects
done
iptables -F
iptables -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --syn -j DROP
==========================================