glug: condivisione rete con pių sottoreti

- FrA - jango.rules@gmail.com
Gio 26 Maggio 2005 09:36:17 CEST


salve a tutti!
ho finalmente tirato su il mio firewall casalingo :)
per evitare di usare un ulteriore hub ha 3 schede di rete: 1 per 
fastweb, 2 per i client.
per condividere la connessione ho seguito una guida ma:
se uso i parametri della guida:

############
EXT_INT="eth0"
IPTABLES="/sbin/iptables"
INTERNAL_NET1="192.168.1.0/24"
INTERNAL_NET2="192.168.2.0/24"


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


$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
##############

non funziona.
Usando invece questi (sono andato ad intuito):
##############

IPTABLES="/sbin/iptables"


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

iptables -t nat -A POSTROUTING -s 192.168.1.2 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.1.2 -o eth0 -j MASQUERADE
###################
funziona!

nota, se nel mio script metto le $ come sopra (cosa che credo sarebbe da manuale) non funziona piu :()
Visto che funziona non mi lamento, ma vorrei capire cosa c'č di sbagliato...
mi rimetto a voi!
Grazie :)
iptables -t nat -A POSTROUTING -s 192.168.2.2 -o eth0 -j MASQUERADE


-- 
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



Maggiori informazioni sulla lista glug