osea no me guarda en el access.log el historial de accesos....
esta son mis reglas...
Código:
iptables -F && echo "ok" iptables -X && echo "ok" iptables -Z && echo "ok" iptables -t nat -F && echo "ok" iptables -P INPUT DROP && echo "ok" iptables -P OUTPUT DROP && echo "ok" iptables -P FORWARD DROP && echo "ok" iptables -t nat -P PREROUTING DROP && echo "ok" iptables -t nat -P POSTROUTING DROP && echo "ok" echo "dando acceso al localhost" iptables -A INPUT -i lo -j ACCEPT && echo "ok" iptables -A OUTPUT -o lo -j ACCEPT && echo "ok" iptables -A INPUT -i eth1 -s 192.168.0.0/24 -j DROP && echo "" iptables -t nat -A PREROUTING -i eth0 -j ACCEPT && echo "ok" iptables -t nat -A POSTROUTING -o eth1 -j ACCEPT echo "dejamos pasar a 2 pc para administrarlas" iptables -A INPUT -s 192.168.1.7 -j ACCEPT && echo "ok" iptables -A OUTPUT -d 192.168.1.7 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.10 -j ACCEPT && echo "ok" iptables -A OUTPUT -d 192.168.1.10 -j ACCEPT && echo "ok" echo "ACCESO A LA BASE DE DATOS" iptables -A INPUT -s 192.168.1.10 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -d 192.168.1.10 -p tcp --sport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.11 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -d 192.168.1.11 -p tcp --sport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.118 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -d 192.168.1.118 -p tcp --sport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.55 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.55 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.56 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.56 -p tcp --dport 5432 -j ACCEPT && echo "ok" echo "Zulema, Veronica, Oscar" iptables -A INPUT -s 192.168.1.100 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.100 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.106 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.106 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.48 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.48 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.74 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.74 -p tcp --dport 5432 -j ACCEPT && echo "ok" echo "Registro civil " iptables -A INPUT -s 192.168.1.194 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.194 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A INPUT -s 192.168.1.193 -p tcp --dport 5432 -j ACCEPT && echo "ok" iptables -A OUTPUT -s 192.168.1.193 -p tcp --dport 5432 -j ACCEPT && echo "ok" echo "acceso al puerto 80" iptables -A INPUT -p tcp --dport 80 -j ACCEPT && echo "ok" iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT && echo "ok" echo "acceso a los puertos 80,53,443" iptables -A FORWARD -s 192.168.1.0/24 -i eth0 -p tcp --dport 80 -j ACCEPT && echo "ok" iptables -A FORWARD -d 192.168.1.0/24 -i eth1 -p tcp --sport 80 -j ACCEPT && echo "ok" iptables -A FORWARD -s 192.168.1.0/24 -i eth0 -p udp --dport 80 -j ACCEPT && echo "ok" iptables -A FORWARD -d 192.168.1.0/24 -i eth1 -p udp --sport 80 -j ACCEPT && echo "ok" iptables -A FORWARD -s 192.168.1.0/24 -i eth0 -p tcp --dport 53 -j ACCEPT && echo "ok" iptables -A FORWARD -d 192.168.1.0/24 -i eth1 -p tcp --sport 53 -j ACCEPT && echo "ok" iptables -A FORWARD -s 192.168.1.0/24 -i eth0 -p udp --dport 53 -j ACCEPT && echo "ok" iptables -A FORWARD -d 192.168.1.0/24 -i eth1 -p udp --sport 53 -j ACCEPT && echo "ok" iptables -A FORWARD -s 192.168.1.0/24 -i eth0 -p tcp --dport 443 -j ACCEPT && echo "ok" iptables -A FORWARD -d 192.168.1.0/24 -i eth1 -p tcp --sport 443 -j ACCEPT && echo "ok" iptables -A FORWARD -s 192.168.1.0/24 -i eth0 -p udp --dport 443 -j ACCEPT && echo "ok" iptables -A FORWARD -d 192.168.1.0/24 -i eth1 -p udp --sport 443 -j ACCEPT && echo "ok" iptables -t nat -A PREROUTING -s 192.168.1.0/24 -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 && echo "ok" iptables -t nat -A POSTROUTING -o eth1 -s 192.168.1.0/24 -j MASQUERADE && echo "ok" echo "bit de Forwarding" echo 1 > /proc/sys/net/ipv4/ip_forward && echo "Bit de Forwarding ok"