squid starts !
public text v1 · immutable[root@ngetoptiban ~]# crontab -l
* 23 * * * /root/squidstop.sh
* 7 * * * /root/squidstart.sh
[root@ngetoptiban ~]# cat squidstart.sh
#!/bin/sh
/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp -s 192.168.0.0/24 --dport 80 -j DNAT --to 192.168.0.1:3128 && service squid start
[root@ngetoptiban ~]# cat squidstop.sh
#!/bin/sh
/sbin/iptables -t nat -D PREROUTING -i eth1 -p tcp -s 192.168.0.0/24 --dport 80 -j DNAT --to 192.168.0.1:3128 && service squid stop