{"id":78,"date":"2007-10-31T16:05:07","date_gmt":"2007-10-31T22:05:07","guid":{"rendered":"http:\/\/mcguyverofbeer.com\/?p=78"},"modified":"2007-10-31T16:05:07","modified_gmt":"2007-10-31T22:05:07","slug":"beating-comcast-sandvine","status":"publish","type":"post","link":"https:\/\/www.scottharvanek.com\/?p=78","title":{"rendered":"Beating Comcast \/ Sandvine"},"content":{"rendered":"<p>If you are tired of Sandvine screwing with your BitTorrent and a user of GNU\/Linux, then this is for you. I will tell you how to take your bandwidth back.<\/p>\n<p>If you are using a Red Hat Linux derivative, such as <strong>Fedora Core<\/strong> or <strong>CentOS<\/strong>, then you will want to edit \/etc\/sysconfig\/iptables. First, make a backup of this file. Next, open this file in your favorite text editor. Replace the current contents with this, substituting 6883 with your BitTorrent port number:<\/p>\n<p><span style=\"color: #660000\">*filter<br \/>\n:INPUT ACCEPT [0:0]<br \/>\n:FORWARD ACCEPT [0:0]<br \/>\n:OUTPUT ACCEPT [0:0]<br \/>\n-A INPUT -i lo -j ACCEPT<br \/>\n#Comcast BitTorrent seeding block workaround<br \/>\n-A INPUT -p tcp &#8211;dport 6883 &#8211;tcp-flags RST RST -j DROP<br \/>\n-A INPUT -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT<br \/>\n#BitTorrent<br \/>\n-A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 6883 -j ACCEPT<br \/>\n-A INPUT -m state &#8211;state NEW -m udp -p udp &#8211;dport 6883 -j ACCEPT<br \/>\n-A INPUT -j REJECT &#8211;reject-with icmp-host-prohibited<br \/>\nCOMMIT<\/span><\/p>\n<p>Reload your iptables firewall with <strong>service iptables restart<\/strong>. You should now see a great improvement in your seeding.<\/p>\n<p>If you are using <strong>Ubuntu <\/strong>or another non-Red Hat Linux derivative, then place the following in a file and execute that file as root.<\/p>\n<p><span style=\"color: #660000\">#!\/bin\/sh<br \/>\n#Replace 6883 with you BT port<br \/>\nBT_PORT=6883<\/p>\n<p>#Flush the filters<br \/>\niptables -F<\/p>\n<p>#Apply new filters<br \/>\niptables -A INPUT -i lo -j ACCEPT<br \/>\n#Comcast BitTorrent seeding block workaround<br \/>\niptables -A INPUT -p tcp &#8211;dport $BT_PORT &#8211;tcp-flags RST RST -j DROP<br \/>\niptables -A INPUT -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT<br \/>\n#BitTorrent<br \/>\niptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport $BT_PORT -j ACCEPT<br \/>\niptables -A INPUT -m state &#8211;state NEW -m udp -p udp &#8211;dport $BT_PORT -j ACCEPT<br \/>\niptables -A INPUT -j REJECT &#8211;reject-with icmp-host-prohibited<\/span><span style=\"color: #660000\"><\/p>\n<p><span style=\"color: #000000\">Your firewall is now configured and you should have great upload speed now. You will have to run this script every boot, by the way. One easy way is to call the script at the end of \/etc\/rc.local.<\/span><\/span><\/p>\n<p>Credit for this write up goes to <a href=\"http:\/\/redhatcat.blogspot.com\/2007\/09\/beating-sandvine-with-linux-iptables.html\">Cat in the Red Hat<\/a><\/p>\n<p>Well done sir \ud83d\ude42<\/p>\n<p>-Scott<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are tired of Sandvine screwing with your BitTorrent and a user of GNU\/Linux, then this is for you. I will tell you how to take your bandwidth back. If you are using a Red Hat Linux derivative, such &hellip; <a href=\"https:\/\/www.scottharvanek.com\/?p=78\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,2],"tags":[],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-ass-whooping","category-online-rights"],"_links":{"self":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":0,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scottharvanek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}