LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-03-2007, 01:12 PM   #1
jonette20
Member
 
Registered: Jul 2007
Location: Ohio
Distribution: Ubuntu 7.04
Posts: 65

Rep: Reputation: 15
How Squid is connecting


Hi,
Thanks to everyone who have helped me get this far. You know who u are.
Still trying to iron out issues before sharing the joy with my boss.(smile)

I setup client browser to access internet via Squid server port 3128.
I was able to access internet but not sure if server request is going thru firewall or directly to router.
The access.log indicates a MISS by the server, but I'm thinking it's referring to a cache MISS.
Not really concerned about caching sites, would prefer not actually.
Concerned more about allowing specfic sites and blocking all others.
I guess I have two questions.

1. How do I verfiy that the requests are going via squid-firewall-router?

2. How do I setup squid.conf to allow a certain list of sites?
I believe I can use the dstdomain command, but is there a limit to how many sites you can enter per line?

Thanks in advance for any insight on this matter.

jonette20
 
Old 10-03-2007, 02:29 PM   #2
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 40
Quote:
Originally Posted by jonette20 View Post
2. How do I setup squid.conf to allow a certain list of sites?
See if this link helps: http://linux-faqs.com/Forum/viewtopic.php?t=28
I think these are the relevant parts for access-control to sites (add them in your squid.conf):
Code:
acl GoodURL url_regex -i 123abc.com 
acl GoodURL url_regex -i abc123.com 

acl badURL url_regex -i xyz.com 

http_access allow GoodURL all 
http_access deny badURL
You'll need to fine tune it of course, I've not even touched my squid.conf at all until now.
 
Old 10-03-2007, 02:40 PM   #3
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Rep: Reputation: 15
Quote:
Originally Posted by jonette20 View Post
1. How do I verfiy that the requests are going via squid-firewall-router?
traceroute should be able to show you this as long as you're not blocking ICMP traffic in your internal network.

For clarification, is your setup like the following example?

client-->squid-->firewall-->router

Or do you have the router and firewall switched around? I'm assuming it's as my "diagram" shows. If that's the case, depending on how your firewall is setup, you may or may not receive the 'TTL expired in transit' messages after the firewall. Most people setup firewalls to block requests incoming (or replies outgoing), but allow any informational ICMP types like, for example, an echo reply (type 0) or a time exceeded (type 11) to enter your network. In that way, you can ping an external source (www.google.com, for example) to verify connectivity while simultaneously blocking unsolicited ICMP traffic that attempts to enumerate your network.

Anyway, even if you're blocking any incoming ICMP at the firewall, there's a good chance your firewall will respond to your traceroute, and if you got that far, you got past the squid (meaning any website data you received *had* to come from outside).

Does this solve your problem?

-TDS-
 
Old 10-04-2007, 08:19 AM   #4
jonette20
Member
 
Registered: Jul 2007
Location: Ohio
Distribution: Ubuntu 7.04
Posts: 65

Original Poster
Rep: Reputation: 15
Hi,

My setup is like u said client-squid-firewall-router.
When I do a traceroute for google.com from the Squid system, it comes back with the ip of the router.
Should it show the firewalls ip, if ICMP is in place?
Should it timeout?

Thanks
jonette20
 
Old 10-05-2007, 10:22 AM   #5
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Rep: Reputation: 15
Can you post your traceroute output? If you can (and do), please also post the IPs you see for each device (example: client is 192.168.1.101, squid is 192.168.1.50, fw is 192.168.1.230, router is 192.168.1.1, or whatever they actually are from your side. If you're using publicly routable IPs, feel free to change the output before you post, but just keep the IPs consistent.

-TDS-
 
Old 10-11-2007, 07:50 AM   #6
jonette20
Member
 
Registered: Jul 2007
Location: Ohio
Distribution: Ubuntu 7.04
Posts: 65

Original Poster
Rep: Reputation: 15
Hi again,

I was able to confirm that I am going thru the firewall to connect to internet on Squid system.
I believe my system is working correctly now.
Have question about keyword dstdomain? It is allowing me to enter sites that I want to allow, also denying all others. That is a good thing.
However, I need to know if there are any limitations on the amount of sites listed in this way.
Also, what is the difference between using dstdomain and url_regx for allowing specific sites?

Thanks in advance
jonette20
 
  


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
working on squid connecting to network pc's davimint Linux - Server 12 09-23-2007 05:11 PM
Connecting to UDP via Squid depam Linux - Software 5 02-21-2007 03:57 AM
Connecting to UDP via Squid depam Linux - Server 0 02-02-2007 04:58 AM
SSH FATAL ERROR while connecting to SQUID sureshn Linux - General 3 08-10-2006 03:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:40 AM.

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