Results 1 to 2 of 2

Thread: Squid 2.6 is not working as transparent

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Thanked 0 Times in 0 Posts
    Rep Power

    Default Squid 2.6 is not working as transparent

    some body help me
    I have squid 2.6 stablbe
    os centos 5.3
    kernel 2.6.18
    iptables 1.3.5
    my computer is connected to internet through eth1 it also contains eth0 for external use but I have not connected any machine to it. I want to make it a transparent proxy server but it is not working on localhost.
    when i configure squid.conf with changes like this
    http_port 3128 transparent

    and iptable rules as:
    [root@localhost sysconfig]# /sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
    [root@localhost sysconfig]# /sbin/iptables -A INPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -i eth1 -p tcp --dport 3128
    [root@localhost sysconfig]# /sbin/iptables -A OUTPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -o eth0 -p tcp --dport 80
    [root@localhost sysconfig]# /sbin/iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -i eth0 -p tcp --sport 80
    [root@localhost sysconfig]# /sbin/iptables -A OUTPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -o eth1 -p tcp --sport 80

    I also enabled ip port forwarding
    [root@localhost sysconfig]# /sbin/sysctl -p /etc/sysctl.conf
    net.ipv4.ip_forward = 1
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.default.accept_source_route = 1
    kernel.sysrq = 0
    kernel.core_uses_pid = 1
    net.ipv4.tcp_syncookies = 1
    kernel.msgmnb = 65536
    kernel.msgmax = 65536
    kernel.shmmax = 4294967295
    kernel.shmall = 268435456

    when done with all these settings I am not able to run squid as transparent when I give manual proxy configurations through browser settings it works but does not work as transparent. squid starts and stops normally in either cases. I have tried almost every method discussed on web but have not managed to get it working. Hope some genius will come up with a great solution.

  2. #2
    Join Date
    Nov 2011
    New Delhi, India
    Thanked 2 Times in 2 Posts
    Rep Power


    Please share the output of the commands..

    #iptables -L
    #iptables -L -t nat

    also at the client end have you configured gateway to point our proxy server..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Squid transparent proxy in ubuntu
    By Avinash More in forum Ubuntu / Debian
    Replies: 3
    Last Post: 12th February 2009, 07:54 AM
  2. Squid proxy transparent
    By xoroz in forum Linux software
    Replies: 1
    Last Post: 2nd December 2008, 08:51 PM
  3. How to Squid 2.6 transparent proxy?
    By alex.inoa in forum Networking, Firewalls and Security
    Replies: 5
    Last Post: 30th October 2007, 04:41 AM
  4. Outlook with Squid transparent Proxy
    By bubloob_13 in forum Networking, Firewalls and Security
    Replies: 0
    Last Post: 16th September 2007, 03:37 PM
  5. transparent squid proxy authentication
    By chiku in forum Linux software
    Replies: 1
    Last Post: 27th April 2007, 05:58 PM

Posting Permissions

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