{"id":99,"date":"2006-04-30T20:02:41","date_gmt":"2006-05-01T04:02:41","guid":{"rendered":"http:\/\/outflux.net\/blog\/archives\/2006\/04\/30\/slow-debian-mirror-avoidance\/"},"modified":"2006-04-30T20:02:41","modified_gmt":"2006-05-01T04:02:41","slug":"slow-debian-mirror-avoidance","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2006\/04\/30\/slow-debian-mirror-avoidance\/","title":{"rendered":"slow debian mirror avoidance"},"content":{"rendered":"<p>ftp.us.debian.org has 4 mirror servers in their DNS round-robin.  One of them (216.37.55.114) is very slow (25Kb\/s) for me.  The others are blazing fast, especially 204.152.191.7 (800Kb\/s).  I&#8217;ve gotten sick of having to hit Ctrl-C to abort an <code>apt-get<\/code>, and then restart it, hoping to get a better server out of the DNS.<\/p>\n<p>Today, I added the following to my machine&#8217;s iptables config, so that it will just redirect all attempts from the slow mirror to the fast mirror:<\/p>\n<blockquote><p>iptables -t nat -A OUTPUT -p tcp -d 216.37.55.114 &#8211;destination-port 80 -j DNAT &#8211;to-destination 204.152.191.7<\/p><\/blockquote>\n<p>If I wanted to do this for my whole network, I&#8217;d just slap this rule on my firewall and change &#8220;OUTPUT&#8221; to &#8220;PREROUTING&#8221;.<\/p>\n<p>I love iptables.<\/p>\n<p style='text-align:left'>&copy; 2006, <a href=\"https:\/\/outflux.net\/blog\/\">Kees Cook<\/a>. This work is licensed under a <a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 License<\/a>.<br \/><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><img decoding=\"async\" alt=\"CC BY-SA 4.0\" style=\"border-width:0\" src=\"https:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png\" \/><\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>ftp.us.debian.org has 4 mirror servers in their DNS round-robin. One of them (216.37.55.114) is very slow (25Kb\/s) for me. The others are blazing fast, especially 204.152.191.7 (800Kb\/s). I&#8217;ve gotten sick of having to hit Ctrl-C to abort an apt-get, and then restart it, hoping to get a better server out of the DNS. Today, I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/99"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=99"}],"version-history":[{"count":0,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/99\/revisions"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=99"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=99"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=99"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}