quiero permitir solo algunas IP de mi lan con iptables. para eso le agergo a mi script:
iptables -t nat -A POSTROUTING -s 192.168.10.12 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.10.13 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.10.14 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.10.15 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.10/24 -o ppp0 -j DROP
No estoy muy seguro si la �ltima linea, que deniega el resto de la LAN va como esta o asi:
iptables -A FORWARD -s 192.168.0.10/24 -o ppp0 -j DROP
alguna idea?
Yo lo har�a asi ojo que es solo para lo que pedis, no se bien que es lo que queres hacer, habria que mirar que otras cosas queres abrir.
=========================== iptables -P INPUT DROP ===========================
# Permito servicios www y ssh (ejemplo ilustrativo) iptables -A INPUT -p tcp --dport http -j ACCEPT iptables -A INPUT -p tcp --dport ssh -j ACCEPT
# s�lo maquinas que habilitadas iptables -A INPUT -s 192.168.10.12 -j ACCEPT iptables -A INPUT -s 192.168.10.13 -j ACCEPT iptables -A INPUT -s 192.168.10.14 -j ACCEPT iptables -A INPUT -s 192.168.10.15 -j ACCEPT
# Dejo conecciones establecidas iptables -A OUTPUT -m state --state NEW -o eth0 -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -m state --state NEW -o eth0 -j ACCEPT iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# Masquerade local subred iptables -t nat -A POSTROUTING -s 192.168.0.10/24 -o eth0 -j MASQUERADE
iptables -L -n -v
-- Cristian P. Biondi [EMAIL PROTECTED]
+---------------------------------------------------------------------+ |http://www.elciudadanobche.com.ar/claves/cristian | |Huella de clave = 47AD F2B4 F52F A8A9 78AE 49F5 9679 EE67 4049 012F | +---------------------------------------------------------------------+ _______________________________________________ Lista de Correo Lnx-brc [EMAIL PROTECTED] http://www.cenitec.com.ar/mailman/listinfo/lnx-brc Grupo de Ususarios de Linux Bariloche - GULBar - http://www.gulbar.homelinux.org
