LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-22-2011, 08:44 PM   #1
hans_bug
LQ Newbie
 
Registered: May 2011
Posts: 9

Rep: Reputation: Disabled
Squid Proxy in CentOS


hi,
i'm new to linux and i was tasked to setup a proxy server to block access to some websites.
i'm using centOS 5 and Squid 7:2.6 STABLE21-6.e15...i appended the following and tested the configuration with the supposed server i am using and the it does seem to work but now i'm wondering how i can test it with a client computer..i have 2 LAN cards and i just connected the other to one PC (can a direct connection work or does it need to pass thru a switch or hub)...i just can't figure out how it should be...please help..thanks much!

how do i configure the 2nd LAN card to use this computer as its proxy server?

Last edited by hans_bug; 05-24-2011 at 02:25 AM.
 
Old 05-23-2011, 12:02 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
Set the IP address to the second network interface and connect it to your local network using Switch. Use this IP address in the squid.conf file so that squid listens on this IP address for the connections. This adds a level of security as well.
Code:
http_port <Internal_Card_IP>:<port> // the port part can be optional and is defaulted to 3128
Test that internet is working fine on squid system itself. Once this is done, start the squid service.
Code:
service squid start
should do it on RHEL clones. If it does not properly start the first time, chances are cache directories are not present.
Code:
squid -z
should create them.

Configure your client browsers to use proxy server and use the above IP address and port configured in squid.conf. And now test internet connectivity.
 
1 members found this post helpful.
Old 05-23-2011, 07:33 AM   #3
hans_bug
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
..thanks much..
..i've tried but it still didn't work...if i use 2 NICs in 1 PC, should there be a configuration to make aside from that of the squid config?
..or can i test my squid config using 1 NIC...i mean this PC is connected to a switch so can i just configure the other computers to use this as proxy???
 
Old 05-23-2011, 07:39 AM   #4
scream
Member
 
Registered: Feb 2008
Distribution: Oracle Linux
Posts: 32

Rep: Reputation: 0
how internet is connected with your proxy server?
 
Old 05-23-2011, 11:35 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
Your squid probably should have two network cards. This is the way proxy should work. There should be no configuration apart from the fact that the two network interfaces should be assigned IP addresses in different networks. Also, how is your internet connected to proxy?
Also, what are the errors? Just saying does not work says nothing to us. And means nothing. Try and give more information on the errors from the log files.
 
1 members found this post helpful.
Old 05-24-2011, 12:59 AM   #6
hans_bug
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
hi, thanks..its working now..it was just a problem with the IP addresses assigned..
thanks much again!

Last edited by hans_bug; 05-24-2011 at 01:03 AM.
 
Old 05-24-2011, 01:14 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
Good to know. You are welcome.
 
Old 05-25-2011, 08:30 PM   #8
hans_bug
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
hello again...
i have encountered my first issue with using squid proxy, i cannot download files from FTP servers.
please help..thanks much!

the error looks like this:
use PORT of PASV

and the other is:
* Read Error

The system returned:

(104) Connection reset by peer

An error condition occurred while reading data from the network. Please retry your request.

and the other is this:

Last edited by hans_bug; 05-31-2011 at 08:02 PM.
 
Old 05-31-2011, 08:03 PM   #9
hans_bug
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
hello again...
i have encountered my first issue with using squid proxy, i cannot download files from FTP servers.
please help..thanks much!

the error looks like this:
use PORT of PASV

and the other is:
* Read Error

The system returned:

(104) Connection reset by peer

An error condition occurred while reading data from the network. Please retry your request.

and the other is this:
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
squid proxy server in centos 5.5 final configuration dkanyi Linux - Newbie 2 04-12-2011 09:52 AM
want to set up squid proxy server on centos 5.4 for 10 computers in a small network aliabbass Linux - Server 1 11-29-2010 09:26 PM
new build centos 5.5 squid proxy start error salimshahzad Linux - Newbie 2 10-30-2010 06:33 AM
LXer: Anonymous Proxy Using Squid 3 On CentOS 5.x LXer Syndicated Linux News 0 11-21-2008 06:30 PM


All times are GMT -5. The time now is 10:13 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration