0

In short I live outside of Germany and I'd like to have access to Amazon Prime. Unfortunately, geoblocking prevents me from using my Prime account in that way.

I have a vserver in Germany, Ubuntu 16.04. I also have an Ubuntu 16.04 box here at home on which runs a KVM VM with Untangle firewall. The box itself has bind installed, acting as a DNS forwarder.

When I create a tunnel to the vserver with putty and point my browser at it in the SOCKS section, I can access the previously forbidden content.

Since my wife should be able to tune into some really old school TV shows for our kids without fiddling with browser settings every time, I want to create a situation where the DNS or the firewall will take care of this. Obviously it makes little sense to route all traffic via Germany.

So what is the best way to achieve this? To route only traffic to streaming services through Germany in a transparent way (meaning setting up an internal proxy once on all machines or some such would be acceptable).

Thanks in advance for the help.

1 Answer 1

0

Well, I found a solution:

I created a .pac script to automatically configure proxy settings:

function FindProxyForURL(url, host) 
{
    // Your proxy server name and port
    var proxy_server = "127.0.0.1:8080";
    var no_proxy_server = "DIRECT";
    {
    // List of hosts to connect via the PROXY server
    var proxy_list = new Array(
                               "*.amazon.com/*",
                               "*.amazon.de/*",
                               "*.akamaihd.net/*",
                               "*.ssl-images-amazon.com/*"
    );

    //Return proxy name for matched domains/hosts
    for (var i = 0; i < proxy_list.length; i++){
        var value = proxy_list[i];
        if (shExpMatch(url, value) ) {
            return "SOCKS "+proxy_server;
        }
    }

    return no_proxy_server;
    }
    return no_proxy_server;
}

By entering this script in the proxy settings of Windows or Mac OSX (in the format file://c:/scriptpath/script.pac for Windows), every browser will automatically reroute only Amazon traffic via the SSH tunnel specified (in this case localhost).

1
  • Is it possible you copied something wrong in here? There is an opening { out of nowhere and in the end the return no_proxy_server; } seems to be a duplicate
    – derHugo
    Nov 27, 2017 at 8:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .