Amigo al parecer te falto el defaults al final:

update-rc.d tu_script defaults

Saludos

On Thu, Feb 23, 2012 at 11:36 AM, renzo izquierdo <[email protected]>wrote:

> Srs buenos dias. estoy intentando agregar mi script para que se ejecute de
> manera automatica al encender el ordenador y me he encontrado con el
> siguiente mensaje al aplicar el siguiente comando:
>
> chmod -x iptables_para_proxy_transparente
> luego copie el script en  /etc/init.d/
> y al hacer:
> root@iNFORMATIK:~# update-rc.d iptables_para_proxy_transparente
> update-rc.d: using dependency based boot sequencing
> update-rc.d: error: not enough arguments
> usage: update-rc.d [-n] [-f] <basename> remove
>        update-rc.d [-n] <basename> defaults [NN | SS KK]
>        update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
>        update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
>                 -n: not really
>                 -f: force
>
> The disable|enable API is not stable and might change in the future.
>
> el script tiene lo siguiente
>
> #!/bin/sh
> # hacemos que linux routee
> echo 1 > /proc/sys/net/ipv4/ip_forward
> # squid server IP
> SQUID_SERVER="192.168.1.5"
> # Interface connected to Internet
> INTERNET="eth3"
> # Interface connected to LAN
> LAN_IN="eth0"
> # Squid port
> SQUID_PORT="3128"
> # DO NOT MODIFY BELOW
> # Clean old firewall
> iptables -F
> iptables -X
> iptables -t nat -F
> iptables -t nat -X
> iptables -t mangle -F
> iptables -t mangle -X
> # Load IPTABLES modules for NAT and IP conntrack support
> modprobe ip_conntrack
> modprobe ip_conntrack_ftp
> # For win xp ftp client
> #modprobe ip_nat_ftp
> echo 1 > /proc/sys/net/ipv4/ip_forward
> # Setting default filter policy
> iptables -P INPUT DROP
> iptables -P OUTPUT ACCEPT
> # Unlimited access to loop back
> iptables -A INPUT -i lo -j ACCEPT
> iptables -A OUTPUT -o lo -j ACCEPT
> # Allow UDP, DNS and Passive FTP
> iptables -A INPUT -i $INTERNET -m state --state ESTABLISHED,RELATED -j
> ACCEPT
> # set this system as a router for Rest of LAN
> iptables --table nat --append POSTROUTING --out-interface $INTERNET -j
> MASQUERA$
> iptables --append FORWARD --in-interface $LAN_IN -j ACCEPT
> # unlimited access to LAN
> iptables -A INPUT -i $LAN_IN -j ACCEPT
> iptables -A OUTPUT -o $LAN_IN -j ACCEPT
> # DNAT port 80 request comming from LAN systems to squid 3128
> ($SQUID_PORT) aka$
> iptables -t nat -A PREROUTING -i $LAN_IN -p tcp --dport 80 -j DNAT --to
> $SQUID_$
> # if it is same system
> iptables -t nat -A PREROUTING -i $INTERNET -p tcp --dport 80 -j REDIRECT
> --to-p$
> # DROP everything and Log it
> iptables -A INPUT -j LOG
> iptables -A INPUT -j DROP
>
>
> PD: ya he revisado san google e intentado con otras formas y aun no
> consigo; uso debian 6, squid 2.7, gracias de antemano al que me pueda
> ayudar.
>
> _______________________________________________
> Lista de correo Linux-plug
> Temática: Discusión general sobre Linux
> Peruvian Linux User Group (http://www.linux.org.pe)
>
> Participa suscribiéndote y escribiendo a:  [email protected]
> Para darte de alta, de baja  o hacer ajustes a tu suscripción visita:
> http://voip2.voip.net.pe/mailman/listinfo/linux-plug
>
> IMPORTANTE: Reglas y recomendaciones
> http://www.linux.org.pe/listas/reglas.php
> http://www.linux.org.pe/listas/comportamiento.php
> http://www.linux.org.pe/listas/recomendaciones.php
>



-- 
Antonio Valdivia
Registered Linux user # 373174
Registered Machine    # 270559
_______________________________________________
Lista de correo Linux-plug
Temática: Discusión general sobre Linux
Peruvian Linux User Group (http://www.linux.org.pe)

Participa suscribiéndote y escribiendo a:  [email protected]
Para darte de alta, de baja  o hacer ajustes a tu suscripción visita:
http://voip2.voip.net.pe/mailman/listinfo/linux-plug

IMPORTANTE: Reglas y recomendaciones
http://www.linux.org.pe/listas/reglas.php
http://www.linux.org.pe/listas/comportamiento.php
http://www.linux.org.pe/listas/recomendaciones.php

Responder a