Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu Home edition set-up as DHCP and Squid proxy, but whenever I reboot my system, I have to restart squid in order for others to start browsing! Is there anyway I can make squid to restart automatically on each reboot, yet it is started when the system boots but I have to restart it once! Also, I have to enter this command for eth0 to redirect traffic through squid!

sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
share|improve this question

It sounds like it needs to startup later in the boot sequence. Maybe it is binding to the wrong interface or the interface you use is not available when it starts. Check the system startup logs for any messages squid is telling you when it firs starts, then consider changing the startup script priority number.

You could also set a reboot in your rc.local file so that it happens automatically last thing in the boot process, but that's kind of a cheap hack. It would be better to figure out why it's failing on the normal startup.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.