Why does Apple's website break with 2o7.net blocked?
dig metrics.apple.com gives

;; ANSWER SECTION:
metrics.apple.com.  4107    IN  CNAME   appleglobal.112.2o7.net.
appleglobal.112.2o7.net. 249    IN  A   66.235.133.14
appleglobal.112.2o7.net. 249    IN  A   66.235.138.2
...


so you could try to dynamically update your hosts file every hour or so:

grep -v metrics.apple.com /etc/hosts &gt; /tmp/raw-hosts
echo $(dig metrics.apple.com | 
       grep ^appleglobal | 
       head -1 | cut -c 35-) metrics.apple.com appleglobal.112.2o7.net &gt;&gt; /tmp/raw-hosts
mv /tmp/raw-hosts /etc/hosts