ipcop support

community support forum
It is currently Sat May 25, 2013 7:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Squid.conf on ipcopv2
Unread postPosted: Mon Feb 20, 2012 9:35 pm 
New User

Joined: Wed Nov 14, 2007 1:30 pm
Posts: 64
Location: Bahia, Brasil
What is the command to edit the/etc/squid/squid.conf on ipcop v2?


Top
 Profile  
 
Unread postPosted: Mon Feb 20, 2012 10:07 pm 
Expert

Joined: Sat Sep 23, 2006 11:23 am
Posts: 2321
Location: LDK | Hessen | Germany
The IPCop web GUI.

_________________
Image

-=[ If you want answers: provide lots of information, including tiny details! ]=-


Top
 Profile  
 
Unread postPosted: Mon Feb 20, 2012 10:27 pm 
New User

Joined: Wed Nov 14, 2007 1:30 pm
Posts: 64
Location: Bahia, Brasil
You can't tell me?


Top
 Profile  
 
Unread postPosted: Mon Feb 20, 2012 10:31 pm 
User

Joined: Mon Jan 18, 2010 7:43 pm
Posts: 182
squid.conf is in /var/ipcop/proxy, but that is subject to being overwritten by updates. Custom stuff should go in /var/ipcop/proxy/acl/include.acl (as noted in squid.conf)

Be careful if you're not certain what you're doing. You can break things there easily.


Top
 Profile  
 
Unread postPosted: Mon Feb 20, 2012 11:05 pm 
New User

Joined: Wed Nov 14, 2007 1:30 pm
Posts: 64
Location: Bahia, Brasil
In version 2.0 of ipcop it gets in/etc/squid/


Top
 Profile  
 
Unread postPosted: Tue Feb 21, 2012 12:06 am 
User

Joined: Mon Jan 18, 2010 7:43 pm
Posts: 182
Lero wrote:
In version 2.0 of ipcop it gets in/etc/squid/


That's where squid.conf is, yes. If you modify squid.conf, then install an update, your modifications may disappear. squid.conf includes /var/ipcop/proxy/acl/include.acl

If you do not put your custom changes in /var/ipcop/proxy/acl/include.acl then they may disappear and you will probably have a hell of a time figuring out why.


Top
 Profile  
 
Unread postPosted: Tue Feb 21, 2012 12:22 am 
Site Moderator
User avatar

Joined: Sun Jun 06, 2004 3:38 am
Posts: 3742
Location: Colorado, USA
Hence the reason NOT to go outside IPCOP's GUI.

If you need a full blown SQUID server - make a full blown SQUID server instead of trying to crowbar IPCOP, a working FIREWALL APPLIANCE to do something it was NOT designed to do.

_________________
For the 2.5^15th time :: Better Details = Better Answers


Top
 Profile  
 
Unread postPosted: Tue Feb 21, 2012 1:14 am 
User

Joined: Mon Jan 18, 2010 7:43 pm
Posts: 182
There's a reason include.acl is there.

And open source is all about doing things with your own stuff that it wasn't designed to do, after all.

(BTW, for what it's worth, the developers clearly intended the include.acl file to be used for custom configuration that is outside the scope of the GUI. We know that for two reasons:

First, there's a remark at the start of squid.conf that says "don't put custom stuff here or a future update might overwrite it" that's clearly not part of the standard squid.conf file, and all the squid.conf related stuff is in a non-standard pace.

And second, include.acl is part of the backup file. When you reinstall and retore, any custom stuff you put there is included.)

The developers clearly recognize that IPCop is not the be-all, end-all of firewalls, usable unmodified by everyone. They have taken this in to account, and made allowances for the fact that people do futz with things. And rightly so, on an open source project.


Top
 Profile  
 
Unread postPosted: Tue Feb 21, 2012 12:09 pm 
New User

Joined: Wed Nov 14, 2007 1:30 pm
Posts: 64
Location: Bahia, Brasil
Thank you, thank you even


Top
 Profile  
 
 Post subject: Squid
Unread postPosted: Tue Feb 21, 2012 6:37 pm 
New User

Joined: Wed Nov 14, 2007 1:30 pm
Posts: 64
Location: Bahia, Brasil
anyone here have a template of squid.conf who can pass me by time-constrained? Another thing to put my ip on "IP Addresses without restriction" and even then I'm picking up the restrictions. I am speaking of IPCOP 2.0.4


Top
 Profile  
 
Unread postPosted: Tue Feb 21, 2012 8:26 pm 
Expert

Joined: Sat Sep 23, 2006 11:23 am
Posts: 2321
Location: LDK | Hessen | Germany
Posts merged.

Read the squid manpages. Edit stuff. Try and figure out why it does not work in the IPCop environment. Repeat.


Probably better to start from scratch with an empty suqid.conf on a XYZ linux though.

_________________
Image

-=[ If you want answers: provide lots of information, including tiny details! ]=-


Top
 Profile  
 
Unread postPosted: Tue Feb 21, 2012 8:59 pm 
User

Joined: Mon Jan 18, 2010 7:43 pm
Posts: 182
Your best bet really is to search Google for squid tutorials. There are a bunch of them out there.

No experience with time limiting, so I can't help you there. For restricting some, but not all, by IP, I have done that. You create lists of IPs like this:

Code:
acl block_IPs src 192.168.16.0/24

This creates a list called "block_IPs" that is the entirety of 192.168.16.0

Code:
acl allow_IPs src 192.168.16.100
acl allow_IPs src 192.168.16.107

This creates a list called "allow_IPs" that includes two specific IP addresses. You can add more IPs by adding more lines.

I have a very short whitelist that's allowed everywhere, and a few PCs in each location that have unrestricted access. To create the whitelist, use the following:

Code:
acl whitelist url_regex .microsoft.com
acl whitelist url_regex .windowsupdate.com


Again, one item per line. This creates a a list of URLs called "whitelist" using regex rules (which you need someone far more knowledgeble than me to tutor you on).

The trick is get your access commands in the correct order. So far as I can tell, it processes them in order, and stops when it reaches one that applies to a particular connection. So to allow access to specific IPs, you put that in first:

Code:
http_access allow allow_IPs

A request from an IP on "allow_IPs" will be allowed, and squid will stop processing.

Otherwise, , to allow access to the white list only for the blocked list of IPS, you add:

Code:
http_access allow whitelist

If the URL is on "whitelist" list, it will be allowed, and squid will stop.

Otherwise, add this:

Code:
http_access deny block_IPs


And any IP on the "block_IPs" list will be blocked, and told that access has been denied, and squid will stop processing.

If, for some reason, the IP isn't on either list, and the URL isn't on the whitelist, squid will allow access by default (presumably as a transparent proxy, otherwise, it's easy to bypass, but you have to turn that on in the GUI).

Again, do not put this in the squid.conf file, or it will possibly be overwritten by a future IPCop update. This belongs in the include.acl file in /var/ipcop/proxy/acls

One more note: This isn't a terribly efficient way to do this, from what I understand. There are other ways of putting information like this in to a database that are far more efficient. If, like me, your lists of IPs and URLs is short, and you're not pushing old, worn-out hardware to its limits, it doesn't make much of a difference. If if you have a large white list or black list, it can impact your internet speed.

Also, very important note: After you have saved your changes, you have to stop and restart squid, or the changes will not take effect. The easy way to do this is to turn off, then back on, the proxy in the GUI.


Top
 Profile  
 
Unread postPosted: Wed Feb 22, 2012 5:53 pm 
New User

Joined: Wed Nov 14, 2007 1:30 pm
Posts: 64
Location: Bahia, Brasil
You can post the squid you should work as I quoted? Will help me a lot.
Sorry, but I have used a translator to read and respond.


Top
 Profile  
 
Unread postPosted: Thu Feb 23, 2012 1:40 am 
User

Joined: Mon Jan 18, 2010 7:43 pm
Posts: 182
I'm not quite sure what you're asking.


Top
 Profile  
 
Unread postPosted: Sun Feb 26, 2012 3:55 pm 
New User

Joined: Wed Nov 14, 2007 1:30 pm
Posts: 64
Location: Bahia, Brasil
So I want is: Two lists of sites allowed in 1-2-horario intregal only in schedules off (before the record - lunch and after work) and to block anything that is not on the whitelist (a list of the first site .)

I hope I have been clear for you to help me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group