Results 1 to 13 of 13
  1. #1
    Join Date
    Apr 2011
    Location
    Myrtle Beach, SC
    Posts
    46

    Exclamation So how can you block certain ad servers/sites on Squid?

    I know a lot of companies/schools etc. use squid to block out certain sites from being accessed by their users. I think actually that's one of the main reasons for installing squid for people to use your network to surf with.

    I can't for the life of me even find a tutorial on blocking out a single ad-server or site with a basic squid config.

    I am looking to buy a dedicated server with some company (haven't even looked yet) & setup squid. But on my home linux computer, I can't yet figure it out, so I won't get a box till I know it can be done.

    Can anyone help point me in the right direction here? Lets say there are flash ads I want to block from mobi22.generic-adserver.cizom

    How would I go about blocking mobi22.generic-adserver.cizom? Thanks ahead of time & if a hosting tech answers this question, I'll be impressed, & I will definitely consider your company to buy my dedicated box!

    - Nerdy Jenn

  2. #2
    Join Date
    Mar 2009
    Posts
    3,816
    Does it have to be squid? If it's just blocking certain hosts, why not use something lightweight like http://www.privoxy.org

  3. #3
    Join Date
    Apr 2011
    Location
    Myrtle Beach, SC
    Posts
    46
    Quote Originally Posted by quantumphysics View Post
    Does it have to be squid? If it's just blocking certain hosts, why not use something lightweight like http://www.privoxy.org
    yea it really needs to be squid right now because I can't afford to pay a tech to install new software right now (on top of a new server bill), however, thank you very much for that tip, I will definitely look into using that!

    I just assumed squid was a pretty widely used software. I assumed most people on here had some experience with it...especially hosts & techs

  4. #4
    Join Date
    Apr 2011
    Location
    Myrtle Beach, SC
    Posts
    46
    Quote Originally Posted by quantumphysics View Post
    Does it have to be squid? If it's just blocking certain hosts, why not use something lightweight like http://www.privoxy.org
    Btw, does privoxy also handle https? In other words, If im using an ip on privoxy on my server & I log into a https:// server, will it handle that handshake, or will it revert to using my computers actual IP address? I.E. does it work as just a http proxy, or http/https/socks etc.

  5. #5
    Join Date
    Mar 2009
    Posts
    3,816
    "Privoxy can only proxy HTTP and HTTPS traffic. It will not work with FTP or other protocols"

  6. #6
    Join Date
    Jul 2009
    Posts
    56
    Are you looking just for a way to block certain URLs from passing through the proxy (i.e. an ad site), or totally block a certain URL, or block all ads with something like AdZapper?

  7. #7
    Join Date
    Apr 2011
    Location
    Myrtle Beach, SC
    Posts
    46
    Quote Originally Posted by djs596 View Post
    Are you looking just for a way to block certain URLs from passing through the proxy (i.e. an ad site), or totally block a certain URL, or block all ads with something like AdZapper?
    Actually I was just looking to block a few certain ad-servers which have become troublesome for our surfers. I'm not a big advocate of blocking ALL commercial endeavors. Otherwise how will sites stay up & make their revenue?

    But if AdZapper has an ad-server list, that we could simply edit, then we'd probably be good to go! So does it? Im totally stoked now.

  8. #8
    Join Date
    May 2006
    Location
    New Zealand
    Posts
    6,933
    Squid Wiki has most answers

    acl Cooking1 url_regex cooking
    acl Recipe1 url_regex recipe
    acl myclients src 172.16.5.0/24
    http_access deny Cooking1
    http_access deny Recipe1
    http_access allow myclients
    http_access deny all
    acl Cooking2 dstdomain www.gourmet-chef.com
    http_access deny Cooking2
    http_access allow all
    You can also reference a file instead "acl blockurl dstdomain "/etc/squid/blockurl"

    http://wiki.squid-cache.org/SquidFaq...CL_ban_list.3F
    █ | Hoopla Hosting -
    █ | WordPress Web Hosting New Zealand - Reseller Hosting - cPanel - Zurmo Hosting - Softaculous - CloudFlare

  9. #9
    Join Date
    Apr 2011
    Location
    Myrtle Beach, SC
    Posts
    46
    Quote Originally Posted by Hoopla-Brad View Post
    Squid Wiki has most answers





    You can also reference a file instead "acl blockurl dstdomain "/etc/squid/blockurl"

    http://wiki.squid-cache.org/SquidFaq...CL_ban_list.3F
    thank you I am going to look into this today & let you know if it works out for me!

  10. #10
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    20,777
    You could also nullroute the host in your hosts file /etc/hosts

    Add

    mobi22.generic-adserver.cizom 0.0.0.0
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Join me on Technical.chat

  11. #11
    Join Date
    Mar 2008
    Posts
    1,717
    If you have a long list of domains you want to block, check out SquidGuard or ufdbguard, both of which I'm pretty sure are much faster than using Squid itself (they plug into squid and take some of the load off the cache IIRC).
    I used to run the oldest commercial Mumble host.

  12. #12
    Join Date
    Apr 2011
    Location
    Myrtle Beach, SC
    Posts
    46
    Quote Originally Posted by fwaggle View Post
    If you have a long list of domains you want to block, check out SquidGuard or ufdbguard, both of which I'm pretty sure are much faster than using Squid itself (they plug into squid and take some of the load off the cache IIRC).
    Which of these 2 would you say would be the best way to go?
    Both seem like they have exactly what I need.
    I can't decide!

  13. #13
    Join Date
    Mar 2008
    Posts
    1,717
    Supposedly ufdbguard is quicker, but I've never used it.
    I used to run the oldest commercial Mumble host.

Similar Threads

  1. Replies: 41
    Last Post: 04-02-2012, 05:38 PM
  2. host multiple squid proxy server with different IP address in one Squid
    By p-root in forum Hosting Security and Technology
    Replies: 3
    Last Post: 05-24-2011, 08:34 AM
  3. Google allows block sites
    By hellind2 in forum Web Hosting Lounge
    Replies: 10
    Last Post: 03-18-2011, 09:23 AM
  4. Https sites block - squid
    By minim in forum Hosting Security and Technology
    Replies: 3
    Last Post: 06-01-2010, 09:27 AM
  5. block vicious sites?
    By andonio in forum Hosting Security and Technology
    Replies: 3
    Last Post: 12-07-2004, 04:20 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •