Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support [solved] Block access to all sites except one using Squid Post 302691451 by jim mcnamara on Friday 24th of August 2012 02:39:38 PM
Old 08-24-2012
I am not sure about ports - but this will block evrything except <blah>
I put # for comments You also need to add localhost so some things don't break.
Code:
acl deny_net src xxx.xxx.0.1- xxx.xxx.0.254    # you get to fiddle with these two lines add more lines as needed
acl deny_net src 10.10.0.1-10.10.0.24           # this is ipv4
acl all src 0.0.0.0/0.0.0.0                             # leave this one alone

acl whitelist dstdomain .example.com
http_access deny deny_net
http_access allow whitelist allow_net
http_access deny all

If you use "acl deny all" it undoes everything above it. The chances of your breaking something are good doing something like the above.

We usually just use a router for this, and allow one subnet through.

Last edited by jim mcnamara; 08-24-2012 at 03:55 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

How to redirect to squid login web page when internet access

Hi , I am new user. As you know when acl is defined in /etc/squid/squid.conf file according to its http_access users are able to access internet. Before that .htaccess asks them to access internet. It is fine. I saw in some customised linux servers in place of .htaccess login ,html web page... (1 Reply)
Discussion started by: sandeepvson
1 Replies

2. UNIX for Advanced & Expert Users

Squid cannot load https sites

Hi guys On FC9 we are running squid-3.0.STABLE2-2.fc9.i386 HTTP traffic works fine, no problems there. When I try to access a secure site, IE, Chrome and Firefox says the page cannot be loaded. I do not see any log entries in the squid access log or the servers messages file. ... (3 Replies)
Discussion started by: wbdevilliers
3 Replies

3. IP Networking

Block sites images with Squid!?

Hi, How i can block images from a particular site with squid? for example i want images from www.yahoo.com not displayed but other site content displayed to user? and how can i authenticate squid users (for e.g webproxy) with windows server 2003 domain controller (Active Directory) ... (0 Replies)
Discussion started by: skynet_boy
0 Replies

4. Emergency UNIX and Linux Support

Configure Squid to use LDAP group auth to deny internet access

Hi all We have squid-2.5.STABLE11-3.FC4 running in our environment. LDAP authentication works fine. Active Directory 2003 Users are prompted to enter credentials every time they access the net. The system works perfectly, but I need to configure Squid to block users in a specific AD group.... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

5. IP Networking

Blocking sites with squid

Hi i have created a proxy with squid and i need to block all domains of yahoo let's say . i have to configure squid.conf but idk how.. (1 Reply)
Discussion started by: g0dlik3
1 Replies

6. UNIX for Dummies Questions & Answers

squid 3.1 block website notworking

squid 3.1.8 on fedora14 http_port 3128 transparent no-connection-auth icp_port 0 icp_query_timeout 0 mcast_icp_query_timeout 2000 dead_peer_timeout 10 seconds log_fqdn off cache_dir aufs /var/spool/squid 1024 16 256 cache_access_log /var/log/squid/access.log cache_access_log ... (0 Replies)
Discussion started by: slackman
0 Replies

7. IP Networking

Squid vs iptables = no Squid access.log?

Hello, I have a pretty useless satellite link at home (far from any civilization), so I wanted to set up caching in order to speed things up. My Squid 2.6 runs "3128 transparent" and is set up quite well on a separate machine. I also have my dd-wrt router to move all port 80 traffic through... (0 Replies)
Discussion started by: theWojtek
0 Replies

8. UNIX for Advanced & Expert Users

squid: Allow access to only one site and only via 80 or 443

Can someone please give me the conf file line to allow access to myexample.com and only that site, and only through http and https? So far I have only that site accessible via http, but all https sites are opened. Squid 3.1 on Cent 6 ---------- Post updated at 12:06 PM ---------- Previous... (0 Replies)
Discussion started by: glev2005
0 Replies

9. Proxy Server

How to use Squid on Linux to control certain IP to access Web Server and certain IP cannot access?

Dear all experts here, :) I would like to install a proxy server on Linux server to perform solely to control the access of Web server. In this case, some of my vendor asked me to try Squid and I have installed it onto my Linux server. I would like know how can I set the configuration to... (1 Reply)
Discussion started by: kwliew999
1 Replies
ACL_DELETE_ENTRY(3)					   BSD Library Functions Manual 				       ACL_DELETE_ENTRY(3)

NAME
acl_delete_entry, acl_delete_entry_np -- delete an ACL entry from an ACL LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <sys/acl.h> int acl_delete_entry(acl_t acl, acl_entry_t entry_d); int acl_delete_entry_np(acl_t acl, int index); DESCRIPTION
The acl_delete_entry() function is a POSIX.1e call that removes the ACL entry entry_d from ACL acl. The acl_delete_entry_np() function is a non-portable version that removes the ACL entry at position index from ACL acl. Positions are numbered starting from zero, i.e. calling acl_delete_entry_np() with index argument equal to zero will remove the first ACL entry. RETURN VALUES
The acl_delete_entry() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The acl_delete_entry() function fails if: [EINVAL] Argument acl does not point to a valid ACL. Argument entry_d is not a valid descriptor for an ACL entry in acl. Argument index is out of bounds. SEE ALSO
acl(3), acl_copy_entry(3), acl_get_entry(3), posix1e(3) STANDARDS
POSIX.1e is described in IEEE POSIX.1e draft 17. HISTORY
POSIX.1e support was introduced in FreeBSD 4.0. The acl_delete_entry() function was added in FreeBSD 5.0. AUTHORS
The acl_delete_entry() function was written by Chris D. Faulhaber <jedgar@fxp.org>. BSD
June 25, 2009 BSD
All times are GMT -4. The time now is 07:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy