[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Regole del firewall



ho cercato di aggiungere al mio file /etc/init.d/firewall delle regole trovate su un wiki.

questo è il risultato che, tuttavia, non funziona:
(le righe prima del divisore sono quelle che avevo da prima e che "funzionano")

#Firewall
#-------------------------------------------
#interfaccia internet,path iptables e sottoreti
#-------------------------------------------
EXT_INT="eth0"
IPTABLES="/sbin/iptables"
INTERNAL_NET1="192.168.1.0/24"
INTERNAL_NET2="192.168.2.0/24"
#-------------------------------------------
#Moduli del kernel
#-------------------------------------------
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
#-------------------------------------------
#Regole di masquerade
#-------------------------------------------
$IPTABLES -t nat -A POSTROUTING -s $INTERNAL_NET1 -o $EXT_INT -j MASQUERADE
$IPTABLES -t nat -A POSTROUTING -s $INTERNAL_NET2 -o $EXT_INT -j MASQUERADE
############################
#Divisore
############################
#-------------------------------------------
#Comportamento di default per i pacchetti in entrata, uscita e transito
#-------------------------------------------
$IPTABLES -P INPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -P OUTPUT ACCEPT
#-------------------------------------------
#Transito dei pacchetti richiesti o provenienti dalla rete interna
#-------------------------------------------
$IPTABLES -A FORWARD -s $INTERNAL_NET1 -j ACCEPT
$IPTABLES -A FORWARD -s $INTERNAL_NET1 -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTALISHED,RELATED -j ACCEPT
#-------------------------------------------
#Ping
#-------------------------------------------
$IPTABLES -A INPUT -i lo -p icmp -j ACCEPT
$IPTABLES -A INPUT -i eth0 -p icmp -j ACCEPT
$IPTABLES -A INPUT -i eth1 -p icmp -j ACCEPT
$IPTABLES -A INPUT -i eth2 -p icmp -j ACCEPT
#-------------------------------------------
#ssh
#-------------------------------------------
$IPTABLES -A INPUT -i eth0 -p tcp -m tcp --dport 22 -s 5.8.xxx.xx -j ACCEPT
$IPTABLES -A INPUT -i eth1 -p tcp -m tcp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -i eth2 -p tcp -m tcp --dport 22 -j ACCEPT

ssh funziona, ma sia i client che il "Firewall" non riescono a pingare in internet => navigare etc.

--
www.debianizzati.org

Per favore non mandarmi allegati Word o PowerPoint.
Puoi utilizzare formati come pdf, html o testo semplice.
Per maggiori informazioni visita:http://www.fsf.org/philosophy/no-word-attachments.it.html

                                -----

Please avoid sending me Word or PowerPoint attachments.
You can use formats like pdf, html or plain text
For more information see:http://www.fsf.org/philosophy/no-word-attachments.html




--
www.debianizzati.org

Per favore non mandarmi allegati Word o PowerPoint.
Puoi utilizzare formati come pdf, html o testo semplice.
Per maggiori informazioni visita:http://www.fsf.org/philosophy/no-word-attachments.it.html

                                -----

Please avoid sending me Word or PowerPoint attachments.
You can use formats like pdf, html or plain text
For more information see:http://www.fsf.org/philosophy/no-word-attachments.html

_______________________________________________
glug mailing list
glug@genova.linux.it
http://lists.linux.it/listinfo/glug


Reply to: