LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-08-2008, 01:12 PM   #16
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32

Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
 
Old 08-09-2008, 12:12 AM   #17
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
Old 08-09-2008, 01:15 PM   #18
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by linuxlover.chaitanya View Post
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 "

can any one recognize this problem.
 
Old 08-09-2008, 02:56 PM   #19
ne pas
Member
 
Registered: Jul 2008
Posts: 55

Rep: Reputation: 23
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.

Last edited by ne pas; 08-09-2008 at 04:11 PM.
 
Old 08-10-2008, 08:03 PM   #20
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by ne pas View Post
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

[root@rahil ~]# netstat -nap | grep squid
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 9239/(squid)
udp 0 0 0.0.0.0:47387 0.0.0.0:* 9239/(squid)
udp 0 0 0.0.0.0:3130 0.0.0.0:* 9239/(squid)
unix 2 [ ] DGRAM 44717 9237/squid
[root@rahil ~]#


Then I added debug in squid.conf file

then I restarted squid service.


still same problem I am sending u email with cache.log file.


Thank you.
 
Old 08-11-2008, 12:58 AM   #21
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
my output of the ifconfig on client

eth0 Link encap:Ethernet HWaddr 00:0C:29:4B:5D:63
inet addr:172.16.19.85 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::20c:29ff:fe4b:5d63/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3006 errors:0 dropped:0 overruns:0 frame:0
TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:313522 (306.1 KiB) TX bytes:15255 (14.8 KiB)
Interrupt:169 Base address:0x1080

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.
 
Old 08-11-2008, 01:02 AM   #22
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
Old 08-11-2008, 01:03 AM   #23
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by rahilmaknojia View Post
my output of the ifconfig on client

eth0 Link encap:Ethernet HWaddr 00:0C:29:4B:5D:63
inet addr:172.16.19.85 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::20c:29ff:fe4b:5d63/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3006 errors:0 dropped:0 overruns:0 frame:0
TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:313522 (306.1 KiB) TX bytes:15255 (14.8 KiB)
Interrupt:169 Base address:0x1080

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.




OKay when i try elinks www.google.com i get thiss error

no route to host and connection refuse.
 
Old 08-11-2008, 01:09 AM   #24
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
yes, my network is up both machine are pinging.
 
Old 08-11-2008, 01:11 AM   #25
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
Old 08-11-2008, 01:14 AM   #26
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
Old 08-11-2008, 01:17 AM   #27
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
 
Old 08-11-2008, 01:37 AM   #28
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
Old 08-11-2008, 03:20 AM   #29
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
 
Old 08-11-2008, 04:29 AM   #30
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.

http://www.cyberciti.biz/tips/linux-...uid-howto.html

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a problem with squid alnmostafa Linux - Software 8 12-26-2006 11:35 PM
I Think its a SQUID problem SBN Linux - Software 1 09-18-2006 09:21 AM
Squid problem John Micheal Linux - Software 1 05-07-2005 05:26 PM
squid problem hariiyer Linux - Networking 7 01-31-2005 11:20 AM
Squid Problem !!!!! baye Linux - General 4 09-09-2004 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration