1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirecting web traffic to proxy server

Discussion in 'Tomato Firmware' started by fordjohn, Apr 6, 2014.

  1. fordjohn

    fordjohn Network Newbie Member

    Okay I guess I need to be a bit more specific. I have added the following code to my firewall section of the router, saved and then rebooted the router.


    #the first two lines permit certain machines through - the proxy itself and a media server
    iptables -t mangle -A PREROUTING -j ACCEPT -p tcp —dport 80 -s
    iptables -t mangle -A PREROUTING -j ACCEPT -p tcp —dport 80 -s $PROXY_IP
    iptables -t mangle -A PREROUTING -j MARK —set-mark 3 -p tcp —dport 80
    ip rule add fwmark 3 table 2
    ip route add default via $PROXY_IP dev br0 table 2

    I then added the following to the proxy's iptables
    iptables -A PREROUTING -t nat -i eth0 -p tcp —dport 80 -j REDIRECT —to-port 3128

    The only thing this seems to accomplish is redirecting http traffic to the proxy that blocks it regardless of of what is in the allow file on squid. HTTPS traffic passes through uninterrupted. Any ideas what the problem is?
    Below is the firmware version that I am using on my asus Dark Night router.
    Current Version: 1.28.0000 MIPSR2-116 K26 USB AIO-64K
    Last edited: Apr 7, 2014
  2. fordjohn

    fordjohn Network Newbie Member

    Edited post to be more specific. Thanks
  3. darkknight93

    darkknight93 Networkin' Nut Member

    maybe you can find something like "Iptables transparent Proxy rules"
  4. rs232

    rs232 Network Guru Member

    Not sure I understand the question/scenario but at first look I don't see anything referring to HTTPS...

Share This Page