LinuxQuestions.org
Review your favorite Linux distribution.
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 04-23-2007, 10:48 AM   #1
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
How to setup proxy server


Hi,
I want to setup proxy server in my home. My one PC has broadband connection and also connected locally with my other PC. I now want to setup a squid server for my 2nd pc. I have setup squid but when gives url from 2nd PC it gives
PHP Code:
ERROR
The reuqested URL could not be retrieved
.
The following error was encountered:
 - 
Unable to forward this request at this time.
The request could not be forwarded to the origin server or to any parent caches.... 
My Setup is as follows:
Code:
/etc/squid/squid.conf

http_port 8000
cache_mem 16 MB
cache_dir ufs /var/spool/squid 1000 16 256


acl local src 192.168.100.0/255.255.255.0
# Gave these two lines before http_access allow localhost
never direct allow all
http_access allow local
squid -z

echo "1" > /proc/sys/net/ipv4/ip_forward
In /etc/sysctl.conf the net.ipv4.ip_forward =1
Also iptables is stop.

Do I have to set cache_peer ? Also do I have to set the hostname other than localhost.localdomain ?
Thanks in advance.
 
Old 04-23-2007, 02:31 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
your config is incomplete / contradictory. it says that whilst your local /24 is allowed to access anything, the proxy must *always* use a peer, due to the "never direct" statement. you have no peers defined though... so it's just hitting a wall. note that "never direct" is relative to the proxy server, not the user. also you've no need to enable ip_forward here, you'd use that i you didn't use squid.
 
Old 04-27-2007, 09:47 AM   #3
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
Problem solved. Thanks. Just commented the line never_direct and also not using cache_peer. One more thing, whats the best tool to analyze squid performance in rhel4? Cacti or something else?
 
  


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
Best info to setup a ftp server behind the proxy server. bruse Linux - Networking 1 12-14-2005 04:13 PM
proxy server setup, 2 NICs in same PC gjhicks Linux - Networking 4 04-06-2005 06:38 AM
proxy server setup help archish Linux - Networking 6 01-25-2004 11:12 PM
setup ftp proxy server blake2000 Linux - Newbie 2 10-05-2003 02:45 PM
setup an ftp proxy server blake2000 Linux - Networking 1 10-05-2003 12:11 AM

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

All times are GMT -5. The time now is 09:25 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