Recommended Posts

I have been reading around this board for a while and I hope that I can get a little help, or rather I hope that I can manage to explain my situation.

Here we go:

I have setup a little network system for a charity. I have a server box running squid/dansguardian as a virtual machine. Dansguardian is a content filtering solution that works well with the existing class of 9 computers. The proxy is fixed at 192.168.0.123. The computers range from 192.168.0.101 to 109.

The gateway for the class computers is the router 192.168.0.4.

The gateway for the proxy is also 192.168.0.4.

The browsers in all class computers are set to go through the proxy at 192.168.0.123

Everything works...BUT they wanted to setup access restriction for the class computers (e.g. students can use the internet only from 2 pm to 4 pm every day but bla bla bla)

I just got the Linksys WRT GL (linux version) and loaded the tomato firmware on it (great access restriction). I call it 192.168.0.5

How do I wire everything up to have both the content filtering and the access restrictions of the new box implemented all together?

I tried leaving 192.168.0.4 as is (gateway configuration) and setting up the new 192.168.0.5 as a routher (not gateway).

<class computers>---<switch>---<router 192.168.0.5>---<gateway 192.168.0.4>

here I connected the two routers in such a way that the WAN of 192.168.0.5 is connected to the LAN1 of 192.168.0.4 and the WAN of 192.168.0.4 is connected to the modem. Something hangs up!!! What should I do???

Well for starters why would you have added another router??? There is no point to it, and 2nd that type of setup is a double nat.. again why??

Squid is more than capable of access control -- why would you have not looked into that vs getting another router??

http://www.linuxhomenetworking.com/wiki/in...s_Control_Lists

Access Control Lists

You can limit users' ability to browse the Internet with access control lists (ACLs). Each ACL line defines a particular type of activity, such as an access time or source network, they are then linked to an http_access statement that tells Squid whether or not to deny or allow traffic that matches the ACL.

Squid matches each Web access request it receives by checking the http_access list from top to bottom. If it finds a match, it enforces the allow or deny statement and stops reading further. You have to be careful not to place a deny statement in the list that blocks a similar allow statement below it. The final http_access statement denies everything, so it is best to place new http_access statements above it

Restricting Web Access By Time

You can create access control lists with time parameters. For example, you can allow only business hour access from the home network, while always restricting access to host 192.168.1.23.

#

# Add this to the bottom of the ACL section of squid.conf

#

acl home_network src 192.168.1.0/24

acl business_hours time M T W H F 9:00-17:00

acl RestrictedHost src 192.168.1.23

#

# Add this at the top of the http_access section of squid.conf

#

http_access deny RestrictedHost

http_access allow home_network business_hours

Or, you can allow morning access only:

#

# Add this to the bottom of the ACL section of squid.conf

#

acl mornings time 08:00-12:00

#

# Add this at the top of the http_access section of squid.conf

#

http_access allow mornings

http://wiki.squid-cache.org/SquidFaq/Squid...bb69030e0b7c906

How can I allow some clients to use the cache at specific times?

Let's say you have two workstations that should only be allowed access to the Internet during working hours (8:30 - 17:30). You can use something like this:

acl FOO src 10.1.2.3 10.1.2.4

acl WORKING time MTWHF 08:30-17:30

http_access allow FOO WORKING

http_access deny FOO

How can I allow some users to use the cache at specific times?

acl USER1 proxy_auth Dick

acl USER2 proxy_auth Jane

acl DAY time 06:00-18:00

http_access allow USER1 DAY

http_access deny USER1

http_access allow USER2 !DAY

http_access deny USER2

etc.. etc.. etc... RTFM of the software your already using before spending money on something else ;)

Thank you BudMan - I am fiddling with this right now. Hopefully I will get it to work!

One thing with the router option was that the GUI is extremely user friendly compared to the above. That is in case the local user admin wanted to change the restrictions without my involvement.

I am getting this to work now based on your recommendation...will report back!

I fail to understand the logic to how just because there is a gui, it makes something easier??

A simple straight forward line that states Allow or Deny seems pretty Freaking easy to me ;)

Loot at it like this -- your text editor is your "GUI" to your config file -- so see a GUI can be used to edit your config ;)

my network is 192.168.0.1-192.168.0.255

localhost is 127.0.0.1

I have everything set up in squid.conf as per instructions...filter works... dansguardian works except that the server cannot deny certain ip numbers e.g. 192.168.0.110!!!

It is as though it is treating everyone being on 127.0.0.1!!! The logs are good though. They tell me 192.168.0.110 did what and when.

Is there a problem in my routing? (Squid is 127.0.0.1 of course and locally it is 192.168.0.123) How do I fix this so it sees ip numbers (I am currently also using webmin but have ultimately gone into manual text editing)

Here is my other squid.conf:

http_port 127.0.0.1:3128

hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?

cache deny QUERY

acl apache rep_header Server ^Apache

broken_vary_encoding allow apache

cache_dir ufs /usr/local/squid/var/cache 100 16 256

access_log /usr/local/squid/var/logs/access.log squid

cache_log /usr/local/squid/var/logs/cache.log

auth_param basic program /etc/webmin/squid/squid-auth.pl /etc/webmin/squid/users

refresh_pattern ^ftp: 1440 20% 10080

refresh_pattern ^gopher: 1440 0% 1440

refresh_pattern . 0 20% 4320

#

acl our_networks src 192.168.0.1-192.168.0.255

acl all src 0.0.0.0/0.0.0.0

acl manager proto cache_object

acl purge method PURGE

acl localhost src 127.0.0.1/255.255.255.255

acl to_localhost dst 127.0.0.1/255.255.255.255

acl SSL_ports port 443

acl Safe_ports port 80 # http

acl Safe_ports port 21 # ftp

acl Safe_ports port 443 # https

acl Safe_ports port 70 # gopher

acl Safe_ports port 210 # wais

acl Safe_ports port 1025-65535 # unregistered ports

acl Safe_ports port 280 # http-mgmt

acl Safe_ports port 488 # gss-http

acl Safe_ports port 591 # filemaker

acl Safe_ports port 777 # multiling http

acl CONNECT method CONNECT

#

http_access allow manager localhost

#

# follow_x_forwarded_for allow our_networks

#

http_access deny manager

http_access allow purge localhost

http_access deny purge

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

acl Bad src 192.168.0.110

# acl WORKING time M T W H F 13:00-14:00

http_access deny Bad

http_access allow localhost

http_access allow our_networks

http_access deny all

http_reply_access allow all

icp_access allow all

cache_effective_user squid

cache_effective_group squid

coredump_dir /usr/local/squid/var/cache

Well how exactly are you users hitting squid? Since you have it only listening on 127.0.0.1

http_port 127.0.0.1:3128

Just set that to the port only, and it will listen on all IPs

BTW you have the acl for WORKING remarked out

"# acl WORKING time M T W H F 13:00-14:00"

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Because it's just a one liner fix. One person ( StartAllBack dev ) was able to fix it... in a cave!
    • I have a first draft of the setup script available here if anybody is curious.  It'll work well enough for me, but obviously adapt it to your own needs as necessary. Link: https://gitlab.com/-/snippets/4876568
    • You make it sound like Microsoft’s success was inevitable—like they just coasted to the top because the system is broken. But that ignores how deep in the gutter Microsoft was. A bit more than a decade ago, Microsoft was a bloated, boring giant—universally hated by developer communities and seen as yesterday’s villain. It was well on its way to becoming the next IBM: slow, corporate, irrelevant. The company had a horrible public image, a toxic internal culture, and leadership plagued by stagnation. It was losing the browser war, failing at mobile, and completely missing the open-source wave—pouring good money after bad into battles it had already lost, playing an impossible catch-up game. Even tech enthusiasts openly wished for its demise. Microsoft’s comeback was nothing short of a miracle. Most companies that size, once caught in that kind of death spiral, never climb back out. But Microsoft reinvented itself—against all odds.
    • Samsung's profit nosedives again as chip division bleeds cash by Paul Hill Samsung has shared its second quarter financials for 2025. Unfortunately for the company, its operating profit plummeted to KRW 4.7 trillion, a sharp decline from KRW 10.4 trillion in 2Q24 and KRW 6.7 trillion in 1Q25. The Korean smartphone giant also recorded a significant drop of net profit to KRW 5.1 trillion in the second quarter, down from KRW 9.8 trillion in 2024 and KRW 8.2 trillion in the first quarter. Finally, overall revenue for the second quarter was KRW 74.5 trillion, a decrease from KRW 79.1 trillion in the first quarter. These figures are based on the consolidated financial statements that have been shared before the external review is completed, so some parts could change once it’s done. The worsening of performance doesn’t seem to be a Samsung issue, but rather a wider industry issue as Intel and LG Electronics have also seen poorer results in the second quarter. The Device Solutions (DS) division, which includes Memory and System LSI/Foundry, saw a big fall in operating profits to KRW 0.4 trillion in 2Q25 from KRW 6.5 trillion in 2Q24 and KRW 1.1 trillion in 1Q25. Despite an 11% increase in sales quarter-over-quarter for the Device Solutions division, profits were severely affected by one-off costs such as inventory value adjustments. The company said that its Foundry earnings were weak due to inventory value adjustments arising from US export restrictions on advanced AI chips to China and prolonged low utilization at mature nodes. Samsung’s Mobile eXperience (MX/NW) division maintained double-digit profitability and grew both its revenue and operating profit year-over-year. The Samsung Display Corporation (SDC) saw revenue increase from new smartphone models and growth in IT/Auto segments, and Harman also improved profitability with increased audio sales and cost optimizations. On the flipside, smartphone shipments fell compared to the first quarter when new models were released. However, good sales of the S25 series, A series, and tablets contributed to year-over-year growth. The Visual Display (VD) division saw earnings decline due to intensified competition despite improved premium sales mix. Going forward, Samsung wants to focus on improving Exynos competitiveness for its 2026 flagship lineup and expand sales of advanced sensors. It also said that its Foundry business will ramp up mass production of a new mobile System-on-Chip (SoC) with the GAA 2nm processor and improve factory utilization. The Mobile eXperience division is also looking to achieve solid profitability by reinforcing AI In tablets and wearables. It’s also planning to launch new form-factor products like XR and TriFold. With US trade tariffs not expected to go anywhere in the near future, Samsung has acknowledged that its Harman and Visual Display/Digital Appliances divisions will be under added pressure but plans to mitigate the impact through its global manufacturing footprint. Source: Samsung | Image via Depositphotos.com
    • I switched my bash script over to using Chromium instead of Edge and it's a much better experience.  Supports my bluetooth XBox controller for gameplay and menu navigation and launched the first time with no nonsense, no popups, nothing.  It just worked.
  • Recent Achievements

    • Week One Done
      whiloh earned a badge
      Week One Done
    • Week One Done
      memnoch earned a badge
      Week One Done
    • First Post
      UAVXP earned a badge
      First Post
    • Dedicated
      Xinotema earned a badge
      Dedicated
    • Rookie
      MrNukes went up a rank
      Rookie
  • Popular Contributors

    1. 1
      +primortal
      658
    2. 2
      ATLien_0
      205
    3. 3
      Xenon
      133
    4. 4
      neufuse
      125
    5. 5
      Michael Scrip
      123
  • Tell a friend

    Love Neowin? Tell a friend!