More PPTP routes

The PPTP script is updated to add routes to Piratebay (blocked by eircom) and to 4OD. Channel 4’s original content is fine but some US shows like Big Bang Theory are blocked outside the UK. I just ran Wireshark and noted the destination address of the HTTP GET message that is sent when clicking play on UK-only content. Messages to that address are then routed via the PPTP tunnel so they appear to originate in the UK. I found a few subnets that are used for this service and there may be more (4OD seem to use Amazon Web Service so potentially all AWS subnets may need to be added)

root@voyage:/etc/ppp/ip-up.d# vi MPN-UK

#!/bin/sh
echo "Running /etc/ppp/ip-up.d/MPN-UK..."

if [ "${PPP_IPPARAM}" = "MPN-UK" ]; then

echo "Add route to bbc.co.uk"

/sbin/route add -net 212.0.0.0/8 dev ${IFNAME}

iptables -I OUTPUT 1 -d 212.58.240.0/8 -o ${IFNAME} -j ACCEPT

echo "Add route to piratebay"

/sbin/route add -net 194.71.107.0/24 dev ${IFNAME}
iptables -I OUTPUT 1 -d 194.71.107.0/24 -o ${IFNAME} -j ACCEPT

echo "Add route to 4od"

/sbin/route add -net 79.125.0.0/17 dev ${IFNAME}
/sbin/route add -net 68.232.0.0/16 dev ${IFNAME}
/sbin/route add -net 46.51.128.0/18 dev ${IFNAME}
/sbin/route add -net 46.137.0.0/17 dev ${IFNAME}
/sbin/route add -net 86.98.16.0/20 dev ${IFNAME}
/sbin/route add -net 54.216.0.0/15 dev ${IFNAME}

iptables -I OUTPUT 1 -d 79.125.0.0/17 -o ${IFNAME} -j ACCEPT
iptables -I OUTPUT 1 -d 68.232.0.0/16 -o ${IFNAME} -j ACCEPT
iptables -I OUTPUT 1 -d 46.51.128.0/18 -o ${IFNAME} -j ACCEPT
iptables -I OUTPUT 1 -d 46.137.0.0/17 -o ${IFNAME} -j ACCEPT
iptables -I OUTPUT 1 -d 86.98.16.0/20 -o ${IFNAME} -j ACCEPT
iptables -I OUTPUT 1 -d 54.216.0.0/15 -o ${IFNAME} -j ACCEPT

echo "NAT"
iptables -t nat -A POSTROUTING -o ${IFNAME} -j MASQUERADE

fi
Advertisements