where internet is not a free place... can tomato help?

Discussion in 'Tomato Firmware' started by rs232, Jul 14, 2011.

  1. rs232

    rs232 Network Guru Member

    I tried to connect to e.g. thepiratebay from the country where I'm in at the moment and found that the ISP is filtering few specific sited.
    Not a big deal using a proxy I can sort it out easily however performance is not the best. Looking up in Internet I've found this easy way to redirect firefox to a proxy for specific sites using a local .pac file:

    function FindProxyForURL(url, host) {
    host = host.toLowerCase();
    if (dnsDomainIs(host, “whatismyip.comâ€))
    return “PROXY 50.16.203.143:80″; // (IP:port)
    if (dnsDomainIs(host, “speedtest.netâ€))
    return “PROXY 50.16.209.227:80″; // (IP:port)
    return “DIRECTâ€;
    }

    Reference: http://www.evilbox.ro/windows/proxy-only-for-certain-sites/


    Now, can you think of a way to achieve this with tomato? So far I can redirect all the traffic to a local proxy using:

    Code:
    #iptables -t nat -A PREROUTING -i br0 -s 192.168.1.0/24 -p tcp --dport 80 -j DNAT --to 192.168.1.3:3128
    #iptables -t nat -A POSTROUTING -o br0 -s 192.168.1.0/24 -p tcp -d 192.168.1.3 -j SNAT --to 192.168.1.1
    #ptables -t filter -I FORWARD -d 192.168.1.3 -i br0 -o br0 -p tcp --dport 3128 -j ACCEPT
    If I can apply this to an Internet proxy and add something to apply the rule for specific FQDN only it should achieve what I'm looking for...

    L7? Any input?

    Thanks :)
    rs232
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice