Results 1 to 4 of 4

Thread: dansguardian/squid proxy firefox bypass

  1. #1
    Join Date
    Oct 2010
    Beans
    4

    Angry dansguardian/squid proxy firefox bypass

    Thanks in advance.
    installed dansguardian and now working fine.I got a small problem.
    People bypassing proxy settings in firefox, means they go to settings and changes proxy settings to no proxy.. how to prevent this? How can I force people to use proxy to connect Internet? I done some googling but, unable to find a solution.
    Peter
    Last edited by peterkp; July 23rd, 2011 at 11:05 AM.

  2. #2
    Join Date
    Oct 2010
    Beans
    4

    Re: dansguardian/squid proxy firefox bypass

    I use ubuntu 11.04 and firefox ver 4

  3. #3
    Join Date
    Jun 2011
    Beans
    32

    Re: dansguardian/squid proxy firefox bypass

    Quote Originally Posted by peterkp View Post
    Thanks in advance.
    installed dansguardian and now working fine.I got a small problem.
    People bypassing proxy settings in firefox, means they go to settings and changes proxy settings to no proxy.. how to prevent this? How can I force people to use proxy to connect Internet? I done some googling but, unable to find a solution.
    Peter
    You use iptables.

    %sudo iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner proxy --dport 80 -j REDIRECT --to-ports 8080
    %sudo iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner dansguardian --dport 3128 -j REDIRECT --to-ports 8080

    After typing in those commands, dont forget to restart squid and/or dansguardian and firefox.

    NOTE: You need to save those commands in a script that gets run every time the machine is booted. From my setup doc that I've written:

    %sudo bash -c "iptables-save > /etc/iptables.rules"

    Create a script "iptablesload" and place script in /etc/network/if-pre-up.d folder. In the script you should have the following lines:

    #!/bin/sh
    iptables-restore < /etc/iptables.rules
    exit 0

    After setting up the script:

    %sudo chmod +x iptables-load

    OPTIONAL: Set system wide proxy setting in Preferences. Doesn't matter if users play with firefox settings after you setup iptables. They're either going nowhere on the Internet or they will be be filtered

    Have fun.
    Last edited by HarriU11-04; August 4th, 2011 at 11:53 PM. Reason: Correction

  4. #4
    Join Date
    Oct 2010
    Beans
    4

    Re: dansguardian/squid proxy firefox bypass

    Thank you sir,
    Great help.
    I was going through IP tables. but I couldn't able to find a solution for my problem. Now I am very clear. Great help. Thank you.

Bookmarks

Posting Permissions

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