Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
With this exact setup there is nothing happening. The requests don't go to the squid server, there is nothing in the squid logs.
When you say "nothing happens", do you mean the clients can't access web pages? Or do you mean that they can, but that they aren't being redirected through squid?
It's NATing redirected traffic to the squid server, to make sure it gets routed through the gateway on its way back. However, the NATed packets go to port 3128 of the squid server, not port 80. The line should read:
Ok, this rules sends requests to the squid server, but I get "Access Denied" from the squid server, which is again due to "WARNING: Forwarding loop detected for:"
Ok, this rules sends requests to the squid server, but I get "Access Denied" from the squid server, which is again due to "WARNING: Forwarding loop detected for:"
Then it seems traffic from the squid server to external web servers is still being redirected back to squid. The "ACCEPT" rule in the PREROUTING chain of the nat table is supposed to prevent that.
Simple test: Does telnet <IP address of a web server> 80 from the squid server land you at the server in question (as it should), or are you redirected back to the squid process at port 3128?
The ip address of a webserver you referring to something like osnews.com and the answer is "Access Denied" also, but you have to keep in mind that on the squid server there are 2 network cards eth0: 192.168.10.254 and eth1: 192.168.10.253 (which is squid).
Squid is setup to run on 192.168.10.253:3128, but it doesn't matter, I'm still getting the same "Access Denied.".
Yes, I can telnet to 192.168.10.253 on port 3128. Actually I can use the proxy server the 'normal' way.
I'm still not sure what there is need for another ACCEPT rule if that ip address is not used at all and that squid listens only on 192.168.10.253?
-A PREROUTING -i eth1 -d 192.168.10.253/32 -j ACCEPT
-A PREROUTING -i eth1 -d 192.168.10.254/32 -j ACCEPT
...says "outbound traffic to 192.168.10.253 and 254 should not be DNATed". These rules should prevent traffic from these addresses from getting DNATed.
The correct version of the above:
Code:
-A PREROUTING -i eth1 -s 192.168.10.253/32 -j ACCEPT
-A PREROUTING -i eth1 -s 192.168.10.254/32 -j ACCEPT
Alter the rules and then please try the telnet test as outlined in post #18. Run the test from the squid server, with and without the squid proces running.
The purpose of the test is to determine whether outbound traffic from the squid server to port 80 on a server on the internet is getting redirected back to squid.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.