squid tproxy does not work

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am trying to set up a transparent proxy using squid and centos 6.9, I have built the following configuration:



1- Upgrade linux kernel to 3.16.56 and built with the configuration options:



 NF_CONNTRACK=m
NETFILTER_TPROXY=m
NETFILTER_XT_MATCH_SOCKET=m
NETFILTER_XT_TARGET_TPROXY=m


2- build squid 3.1 with --enable-linux-netfilter,



http_port 3128
http_port 3129 tproxy


3- routing configuration:



ip -f inet rule add fwmark 1 lookup 100
ip -f inet route add local default dev eth0 table 100


4- kernel configuration



echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter


5- iptables 1.4.7 configuration:



 iptables -t mangle -N DIVERT
iptables -t mangle -A DIVERT -j MARK --set-mark 1
iptables -t mangle -A DIVERT -j ACCEPT
iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark
0x1/0x1 --on-port 3129
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p udp --dport 3138 -j ACCEPT
iptables -A INPUT -p tcp --dport 3139 -j ACCEPT


the proxy does not work and there are no logs in access.log and cache.log. any help, please.







share|improve this question























    up vote
    0
    down vote

    favorite












    I am trying to set up a transparent proxy using squid and centos 6.9, I have built the following configuration:



    1- Upgrade linux kernel to 3.16.56 and built with the configuration options:



     NF_CONNTRACK=m
    NETFILTER_TPROXY=m
    NETFILTER_XT_MATCH_SOCKET=m
    NETFILTER_XT_TARGET_TPROXY=m


    2- build squid 3.1 with --enable-linux-netfilter,



    http_port 3128
    http_port 3129 tproxy


    3- routing configuration:



    ip -f inet rule add fwmark 1 lookup 100
    ip -f inet route add local default dev eth0 table 100


    4- kernel configuration



    echo 1 > /proc/sys/net/ipv4/ip_forward
    echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
    echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
    echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter


    5- iptables 1.4.7 configuration:



     iptables -t mangle -N DIVERT
    iptables -t mangle -A DIVERT -j MARK --set-mark 1
    iptables -t mangle -A DIVERT -j ACCEPT
    iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
    iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark
    0x1/0x1 --on-port 3129
    iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
    iptables -A INPUT -p udp --dport 3138 -j ACCEPT
    iptables -A INPUT -p tcp --dport 3139 -j ACCEPT


    the proxy does not work and there are no logs in access.log and cache.log. any help, please.







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to set up a transparent proxy using squid and centos 6.9, I have built the following configuration:



      1- Upgrade linux kernel to 3.16.56 and built with the configuration options:



       NF_CONNTRACK=m
      NETFILTER_TPROXY=m
      NETFILTER_XT_MATCH_SOCKET=m
      NETFILTER_XT_TARGET_TPROXY=m


      2- build squid 3.1 with --enable-linux-netfilter,



      http_port 3128
      http_port 3129 tproxy


      3- routing configuration:



      ip -f inet rule add fwmark 1 lookup 100
      ip -f inet route add local default dev eth0 table 100


      4- kernel configuration



      echo 1 > /proc/sys/net/ipv4/ip_forward
      echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
      echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
      echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter


      5- iptables 1.4.7 configuration:



       iptables -t mangle -N DIVERT
      iptables -t mangle -A DIVERT -j MARK --set-mark 1
      iptables -t mangle -A DIVERT -j ACCEPT
      iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
      iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark
      0x1/0x1 --on-port 3129
      iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
      iptables -A INPUT -p udp --dport 3138 -j ACCEPT
      iptables -A INPUT -p tcp --dport 3139 -j ACCEPT


      the proxy does not work and there are no logs in access.log and cache.log. any help, please.







      share|improve this question











      I am trying to set up a transparent proxy using squid and centos 6.9, I have built the following configuration:



      1- Upgrade linux kernel to 3.16.56 and built with the configuration options:



       NF_CONNTRACK=m
      NETFILTER_TPROXY=m
      NETFILTER_XT_MATCH_SOCKET=m
      NETFILTER_XT_TARGET_TPROXY=m


      2- build squid 3.1 with --enable-linux-netfilter,



      http_port 3128
      http_port 3129 tproxy


      3- routing configuration:



      ip -f inet rule add fwmark 1 lookup 100
      ip -f inet route add local default dev eth0 table 100


      4- kernel configuration



      echo 1 > /proc/sys/net/ipv4/ip_forward
      echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
      echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
      echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter


      5- iptables 1.4.7 configuration:



       iptables -t mangle -N DIVERT
      iptables -t mangle -A DIVERT -j MARK --set-mark 1
      iptables -t mangle -A DIVERT -j ACCEPT
      iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
      iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark
      0x1/0x1 --on-port 3129
      iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
      iptables -A INPUT -p udp --dport 3138 -j ACCEPT
      iptables -A INPUT -p tcp --dport 3139 -j ACCEPT


      the proxy does not work and there are no logs in access.log and cache.log. any help, please.









      share|improve this question










      share|improve this question




      share|improve this question









      asked May 28 at 7:41









      Wael Dahab

      11




      11

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446427%2fsquid-tproxy-does-not-work%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446427%2fsquid-tproxy-does-not-work%23new-answer', 'question_page');

          );

          Post as a guest













































































          tjNIh r1NbVUZh,evTMWt16,XQB7pnyvbrePWV9Ga
          qDY0YXuQ3 IjQq23,G1R80E 05ZfSQgO,rmd,RIJksZoNT,YOl5dT rghP,J2EfbIUsj4WYGt14RXfRZF7dZbf

          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          How many registers does an x86_64 CPU actually have?

          Displaying single band from multi-band raster using QGIS