I had my Apache webserver perfectly configured and everything worked fine. I asked my friend to setup a cache proxy to make my web answers faster.
So here's what he did (if I understand the history
):
- setup squid proxy
- add iptable routing
And that's it.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
He thought everything was okay but no. Now only me and him can access to my websites... where should I look?
Here's what I thought: "this is just a simple redirection, so I could comment the squid firewall rule and everything should work like it was before squid proxy".
If I try to comment the previous rule, restart iptables, and restart Apache webserver, I get "rejected connexion". What should I do?
Apache probably does not listen on port 80. Look your apache configuration and search for
Listen
directives and theVirtualHost
directives. You friend probably trashed / altered them.Another possibility is that you did not cleared the nat rule from iptables and stopped the squid server.
I bet for the first solution, but can't be sure with the few infos you provide.
Then for the broken configuration, it is difficult to diagnose it without the configurations files for Apache, Squid, and your iptables setup.
If you want more help you should provide them. For iptables configuration run
iptables-save
and copy paste the output. Also it would be interesting to know the network configuration of your server: * does it have one or several network interface ? * Do you access it on lan? Or is it hosted at a remote location?