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.
If its not the transparent proxy then, there is no need to configure anything. Just make sure the cache is initialized and squid is started. And do not mail the squid.conf file. Better post it here in the forum. If not me someone else will come and help you. Mailing is not a good option unless really necessary.
Im sorry what can I do my friend coz this site doesn't accept more then 25000 character and squid file is around 1lak I tried to put that post in thread but isn't work only not more then 250000 character, and yes I have restarted squid, how to check cache.
You dont need to post the complete squid configuration file here. Just the relevant code that you have changed. There is a directive cache_dir which is used to configure squid to store the cache in a file. You can edit that directive. By default it is set to /var/log/squid/cache.log.
You dont need to post the complete squid configuration file here. Just the relevant code that you have changed. There is a directive cache_dir which is used to configure squid to store the cache in a file. You can edit that directive. By default it is set to /var/log/squid/cache.log.
I have tried to install again and i have done it but i think its problem is with client PC when i try to connect or type any website it says "Proxy connect refuse "
Okay, to get along with the solution for your problem I suggest you set squid into debug mode so we can get more information out of it.
First get the address and port squid is bound to
Code:
# netstat -nap | grep squid
Please post the output of this command here and if your client's proxy preferences are different set it accordingly and check if it just works.
If it doesn't work:
The next part is to get squid into debug mode, then access the internet from the client machine and than quickly set squid back to normal mode to avoid that to much debug messages getting logged.
To set Squid into debug mode run the following command, run it again to get back to normal mode.
Code:
# squid -k debug
Please post excerpts of squid's cache.log (e.g. /var/log/squid/cache.log) (only the interesting messages, skip messages like "comm_calliocallback: 0" or the like).
HTH
edit:
Hmm... after a few minutes I think that it is probably a bad idea to set squid in debug mode that way, there will be too much unrelevant messages. Going the other way...
Edit the squid configuration file (e.g. /etc/squid/squid.conf) /etc/squid/squid.conf
Code:
# ...
debug_options ALL,1 28,3 33,3
this sets the debug level for ACL and client-side operations to 3 (should be enough).
Then restart squid
Code:
/etc/init.d/squid restart
wait until squid is fully started ("[ OK ]" appears).
Open a console and run tail to monitor the logfile
Code:
# tail -n 0 -f /var/log/cache.log
try to access the internet from your client machine through proxy.
Inspect the message in the console.
Okay, to get along with the solution for your problem I suggest you set squid into debug mode so we can get more information out of it.
First get the address and port squid is bound to
Code:
# netstat -nap | grep squid
Please post the output of this command here and if your client's proxy preferences are different set it accordingly and check if it just works.
If it doesn't work:
The next part is to get squid into debug mode, then access the internet from the client machine and than quickly set squid back to normal mode to avoid that to much debug messages getting logged.
To set Squid into debug mode run the following command, run it again to get back to normal mode.
Code:
# squid -k debug
Please post excerpts of squid's cache.log (e.g. /var/log/squid/cache.log) (only the interesting messages, skip messages like "comm_calliocallback: 0" or the like).
HTH
edit:
Hmm... after a few minutes I think that it is probably a bad idea to set squid in debug mode that way, there will be too much unrelevant messages. Going the other way...
Edit the squid configuration file (e.g. /etc/squid/squid.conf) /etc/squid/squid.conf
Code:
# ...
debug_options ALL,1 28,3 33,3
this sets the debug level for ACL and client-side operations to 3 (should be enough).
Then restart squid
Code:
/etc/init.d/squid restart
wait until squid is fully started ("[ OK ]" appears).
Open a console and run tail to monitor the logfile
Code:
# tail -n 0 -f /var/log/cache.log
try to access the internet from your client machine through proxy.
Inspect the message in the console.
Hello,
Thankz for the reply.
I have tried using netstat command please check the output of the command
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:648 (648.0 b) TX bytes:648 (648.0 b)
Yes, I have tried using telnet and output is this below
[root@rhel ~]# telnet 172.16.19.66 3128
Trying 172.16.19.66...
telnet: connect to address 172.16.19.66: No route to host
telnet: Unable to connect to remote host: No route to host
[root@rhel ~]#
172.16.19.66 is my server IP and 172.16.19.85 is my client IP
and wen I try #nc 172.16.19.66 3128 nothing happens no output of this command.
Then you should first try if the network is up. Can client connect to the server and vice versa. You could ping them and try if the connection is there. Then advance with squid debugging.
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:648 (648.0 b) TX bytes:648 (648.0 b)
Yes, I have tried using telnet and output is this below
[root@rhel ~]# telnet 172.16.19.66 3128
Trying 172.16.19.66...
telnet: connect to address 172.16.19.66: No route to host
telnet: Unable to connect to remote host: No route to host
[root@rhel ~]#
172.16.19.66 is my server IP and 172.16.19.85 is my client IP
and wen I try #nc 172.16.19.66 3128 nothing happens no output of this command.
Then you should first try if the network is up. Can client connect to the server and vice versa. You could ping them and try if the connection is there. Then advance with squid debugging.
Forget about internet for sometime. First try if the client can connect to the squid server. Then find if the squid is accepting the connections from outside at 3128 port.
If the error is connection refused error then you should find out if some firewall is stopping squid from accepting connections at port 3128. If squid is non transparent and SElinux is disabled, then there is no need to configure iptables for basic operation. Just stop the firewall and find if it is accepting the connections.
If the error is connection refused error then you should find out if some firewall is stopping squid from accepting connections at port 3128. If squid is non transparent and SElinux is disabled, then there is no need to configure iptables for basic operation. Just stop the firewall and find if it is accepting the connections.
Yes, I stoped my firewall too but isnt work, is there anythiong to run squid wen firewall is ON.
Usually, there is nothing special that you should be doing. I have a transparent squid running with no special configurations. Just some access control lists and iptables configuration for redirecting the http requests to squid port and accepting the local connections on http port and redirect loopback internet requests to squid port.
Usually, there is nothing special that you should be doing. I have a transparent squid running with no special configurations. Just some access control lists and iptables configuration for redirecting the http requests to squid port and accepting the local connections on http port and redirect loopback internet requests to squid port.
can you make transparent squid can you explan me how to do it.
There is nothing too difficult about it.
Create the access control lists. in http_port directive, give the option transparent.
Create the iptables firewall rules for forwarding the http requests to squid port.
This link will help you making a transparent squid. But if you make a squid work first, it will be better for you to know where you are going wrong.
Firstly, if squid is installed, create the acls and configure the squid configuration file as you need.
Then start the squid. Turn off the firewall and allow squid from SELinux. Configure the client web browser to use your squid.
Once this gets working go for making it work as transparent.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.