<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0" xml:base="http://bart.motd.be">
<channel>
 <title>Bart Jansens</title>
 <link>http://bart.motd.be</link>
 <description />
 <language>en</language>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BartJansens" /><feedburner:info uri="bartjansens" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
 <title>SheevaPlug Development Kit</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/HHTnRpdQ8hU/sheevaplug-development-kit</link>
 <description>&lt;div style="float: right"&gt;&lt;img src="http://bart.motd.be/sites/bart.motd.be/files/sheevaplug_product_shot.jpg" /&gt;&lt;/div&gt;
&lt;p&gt;A few months ago, I decided to purchase a &lt;a href="http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp"&gt;SheevaPlug Development Kit&lt;/a&gt; to replace my previous home server which was an old Dell workstation. The main reason to replace the old machine was power usage, for a machine that is sitting idle most of the time, it costs a lot of money to run.&lt;br /&gt;
All I needed was a device on which I could run linux to run some typical core network services (DNS, DHCP, NTP) as well a some extras like my internal mail server and proxy. With a power consumption of &lt;a href="http://www.computingplugs.com/index.php/SheevaPlug_Performance"&gt;only a few Watts&lt;/a&gt;, the SheevaPlug was ideal for this purpose. Its a pretty small device with the following specifications:&lt;br /&gt;
&amp;lt;!--break--&gt;&lt;/p&gt;
&lt;h3&gt;Specifications&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;1.2GHz Marvell Kirkwood 6281 CPU&lt;/li&gt;
&lt;li&gt;512MB DDR2 400MHz RAM&lt;/li&gt;
&lt;li&gt;512MB NAND Flash&lt;/li&gt;
&lt;li&gt;Gigabit Ethernet&lt;/li&gt;
&lt;li&gt;USB 2.0 Host&lt;/li&gt;
&lt;li&gt;SDIO interface for SDHC cards&lt;/li&gt;
&lt;li&gt;Serial port&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;The SheevaPlug is shipped with Ubuntu 9.04 “jaunty” installed. The standard software image does have some issues, so the first thing I did was upgrad to the latest version using the &lt;a href="http://www.plugcomputer.org/plugwiki/index.php/SheevaPlug_Installer"&gt;SheevaPlug installer 1.0&lt;/a&gt;. This involved attaching the serial console to a PC and running a script which loaded the new software from an USB stick. This wasn't very difficult, but not exactly something a novice should attempt either. The only issue I ran into was that the USB stick used to perform the upgrade couldn't have any partitions on it. So the stick had to be wiped and formatted as one big FAT32 partition (&lt;em&gt;mkfs.vfat -I /dev/sdX&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;After the upgrade was completed, the device was ready to be configured just like any other debian-like linux machine.&lt;br /&gt;
Because the size of the internal flash is limited, I installed a 4GB SDHC card to mount the directories that are most likely to fill up the storage. &lt;/p&gt;
&lt;p&gt;The next issue I ran into was that after logging in via SSH, the device complained about missing nl_BE locales. Because those are not available on the plug and I didn't really need them, I set the locale to en_US by creating &lt;em&gt;/etc/default/locale&lt;/em&gt; with the following contents:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
LANG="en_US.UTF-8"&lt;br /&gt;
LANGUAGE="en_US.UTF-8:en"&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Software&lt;/h3&gt;
&lt;p&gt;I installed the following software packages, which are working without issues:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;ntp&lt;/dt&gt;
&lt;dd&gt;Internal primary NTP server for use by all clients. Obtains the current time from several external clock sources&lt;/dd&gt;
&lt;dt&gt;bind9&lt;/dt&gt;
&lt;dd&gt;Internal primary DNS server. Hosts the internal DNS zone and accepts DDNS updates from the DHCP server.&lt;/dd&gt;
&lt;dt&gt;dhcp3-server&lt;br /&gt;
&lt;dt&gt;
&lt;dd&gt;Internal DHCP server. Assigns IP addresses to clients and updates the DNS records.&lt;/dd&gt;
&lt;dt&gt;squid3&lt;/dt&gt;
&lt;dd&gt;Proxy server. I don't really need caching, but to access some websites, I need to use an external proxy server. Instead of having to change the client settings every time, this proxy server simply redirects requests for some websites to different upstream proxy servers&lt;/dd&gt;
&lt;dt&gt;postfix&lt;/dt&gt;
&lt;dd&gt;Mail relay. All outbound email needs to pass via this server, again to make it easier to switch to different upstream ISPs and to detect abuse in case a clients gets infected by a virus.&lt;/dd&gt;
&lt;dt&gt;dovecot&lt;/dt&gt;
&lt;dd&gt;Internal IMAP server. This hosts the users mailboxes. Email is retrieved from the ISPs using fetchmail and then stored on this server so that it can be accessed from any computer in the house.&lt;/dd&gt;
&lt;dl&gt;
&lt;h3&gt;Experience&lt;/h3&gt;
&lt;p&gt;The device is working pretty well. Other than a small issue with the SD card, everything has been running stable for a few months now. One of the major drawbacks at the time is the price. Its only 99USD, with shipping costs that adds up to a little over 100EUR plus an additional 30EUR VAT and fees.&lt;/p&gt;
&lt;p&gt;For others interested in purchasing this device in Europe, there now is a company selling them from the UK so you can avoid the additional fees, &lt;a href="http://www.newit.co.uk"&gt;NewIT&lt;/a&gt;. I don't have any experience with them the offers look pretty nice. They can even sell different models, so you won't have to perform the initial upgrade yourself. If anyone has experience with them, good or bad, let me know. I'll probably get another one just to experiment with.&lt;/p&gt;
&lt;/dl&gt;&lt;/dt&gt;&lt;/dt&gt;&lt;/dl&gt;</description>
 <comments>http://bart.motd.be/sheevaplug-development-kit#comments</comments>
 <category domain="http://bart.motd.be/tag/linux">Linux</category>
 <category domain="http://bart.motd.be/tag/marvell">Marvell</category>
 <category domain="http://bart.motd.be/tag/sheevaplug">SheevaPlug</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/57</wfw:commentRss>
 <pubDate>Wed, 18 Nov 2009 14:42:28 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">57 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/sheevaplug-development-kit</feedburner:origLink></item>
<item>
 <title>Iphone tethering mobileconfig for Mobistar</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/9iU_ZhArbKE/iphone-tethering-mobileconfig-mobistar</link>
 <description>&lt;p&gt;&lt;strong&gt;Update: This no longer works with the 3.1 firmware - go thank Apple &amp;amp; Mobistar for that..&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The easiest way to enable tethering on your iPhone is to browse to websites like &lt;a href="http://help.benm.at" title="http://help.benm.at"&gt;http://help.benm.at&lt;/a&gt; which have configuration files that you can install on your phone. However, all the mobileconfig files I found online didn't work for me as they used the wrong APNs. My account needs to use "web.pro.be" for data and "mms.be" for MMS.&lt;/p&gt;
&lt;p&gt;So I created &lt;a href="http://bart.motd.be/sites/bart.motd.be/files/mobistar-pro-tethering.mobileconfig"&gt;my own mobileconfig&lt;/a&gt;, attached to this article. Use at your own risk, I'm not going to guarantee that anything here is correct, but it has been confirmed to work (both tethering and MMS) by several people. To install, simply open the attached file from your iPhone.&lt;/p&gt;
&lt;p&gt;Of course, keep an eye on your bandwidth consumption, it isn't cheap.&lt;/p&gt;
&lt;table id="attachments" class="sticky-enabled"&gt;
 &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Attachment&lt;/th&gt;&lt;th&gt;Size&lt;/th&gt; &lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
 &lt;tr class="odd"&gt;&lt;td&gt;&lt;a href="http://bart.motd.be/sites/bart.motd.be/files/mobistar-pro-tethering.mobileconfig"&gt;mobistar-pro-tethering.mobileconfig&lt;/a&gt;&lt;/td&gt;&lt;td&gt;2.04 KB&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</description>
 <comments>http://bart.motd.be/iphone-tethering-mobileconfig-mobistar#comments</comments>
 <category domain="http://bart.motd.be/tag/iphone">iPhone</category>
 <category domain="http://bart.motd.be/tag/mobistar">mobistar</category>
 <category domain="http://bart.motd.be/tag/tethering">tethering</category>
 <enclosure url="http://bart.motd.be/sites/bart.motd.be/files/mobistar-pro-tethering.mobileconfig" length="2085" type="application/octet-stream" />
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/56</wfw:commentRss>
 <pubDate>Fri, 03 Jul 2009 07:35:10 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">56 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/iphone-tethering-mobileconfig-mobistar</feedburner:origLink></item>
<item>
 <title>Policy based routing on Juniper Netscreen firewalls</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/L7jBr6URmq8/policy-based-routing-juniper-netscreen-firewalls</link>
 <description>&lt;p&gt;Cleaning up my home directory, I found this presentation I made back in 2006 while beta-testing the policy based routing functionality in &lt;a href="htp://www.juniper.net"&gt;netscreen&lt;/a&gt; firewalls.&lt;/p&gt;
&lt;p&gt;Posting it here as it might be of use to some people.&lt;/p&gt;
&lt;div style="width:425px;text-align:left" id="__ss_1509865"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/BartJansens/netscreen-policy-based-routing?type=presentation" title="Netscreen Policy Based Routing"&gt;Netscreen Policy Based Routing&lt;/a&gt;
&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=netscreenpolicybasedrouting-090530075820-phpapp01&amp;stripped_title=netscreen-policy-based-routing" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=netscreenpolicybasedrouting-090530075820-phpapp01&amp;stripped_title=netscreen-policy-based-routing" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;.&lt;/p&gt;&lt;/div&gt;
</description>
 <comments>http://bart.motd.be/policy-based-routing-juniper-netscreen-firewalls#comments</comments>
 <category domain="http://bart.motd.be/tag/juniper">juniper</category>
 <category domain="http://bart.motd.be/tag/netscreen">Netscreen</category>
 <category domain="http://bart.motd.be/tag/routing">routing</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/55</wfw:commentRss>
 <pubDate>Sat, 30 May 2009 13:12:30 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">55 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/policy-based-routing-juniper-netscreen-firewalls</feedburner:origLink></item>
<item>
 <title>Backing up delicious bookmarks</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/CIhiYJF_tCc/backing-delicious-bookmarks</link>
 <description>&lt;p&gt;Social bookmarking services like &lt;a href="http://www.delicious.com"&gt;Delicious&lt;/a&gt; are great for sharing your bookmarks with others or just across multiple computers. But one disadvantage of having them stored in a central location is that you have no control over the backup strategy they use. What if they suffer from a system crash and lose all your data?&lt;br /&gt;
If you think I'm just being paranoid, think of what happened to &lt;a href="http://ma.gnolia.com/"&gt;Ma.gnolia&lt;/a&gt; recently.&lt;/p&gt;
&lt;p&gt;Just to be safe, I wrote a simple little script that takes a copy of all my bookmarks - in XML format - and stores it locally on my PC. Because it is in XML format, converting this data to some other format in the future should be fairly trivial.&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co0"&gt;#!/bin/sh&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co0"&gt;# Your delicious username and password, separated by a colon&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="re2"&gt;CREDENTIALS&lt;/span&gt;=&lt;span class="st0"&gt;&amp;quot;UserName:YourPassword&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co0"&gt;# Location where the backup will be stored&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="re2"&gt;BACKUP_DIR&lt;/span&gt;=&lt;span class="st0"&gt;&amp;quot;&lt;span class="es2"&gt;$HOME&lt;/span&gt;/backups/del.icio.us&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#91;&lt;/span&gt; &lt;span class="sy0"&gt;!&lt;/span&gt; &lt;span class="re5"&gt;-d&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;&lt;span class="es2"&gt;$BACKUP_DIR&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#93;&lt;/span&gt; ; &lt;span class="kw1"&gt;then&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;  &lt;span class="kw2"&gt;mkdir&lt;/span&gt; &lt;span class="re5"&gt;-p&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;&lt;span class="es2"&gt;$BACKUP_DIR&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="kw1"&gt;fi&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="re2"&gt;DATE&lt;/span&gt;=$&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="kw2"&gt;date&lt;/span&gt; +&lt;span class="st0"&gt;&amp;quot;%Y%m%d&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;curl &lt;span class="re5"&gt;--user&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;&lt;span class="es2"&gt;$CREDENTIALS&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class="re5"&gt;-o&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;&lt;span class="es2"&gt;$BACKUP_DIR&lt;/span&gt;/bookmarks-&lt;span class="es2"&gt;$DATE&lt;/span&gt;.xml&amp;quot;&lt;/span&gt; &lt;span class="re5"&gt;-O&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;https://api.del.icio.us/v1/posts/all&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The script is run from cron on a regular basis, so even if something were to happen to &lt;a href="http://www.delicious.com"&gt;Delicious&lt;/a&gt;, I still have a copy of all my bookmarks. Lets hope I never need it.&lt;/p&gt;
</description>
 <comments>http://bart.motd.be/backing-delicious-bookmarks#comments</comments>
 <category domain="http://bart.motd.be/tag/backup">backup</category>
 <category domain="http://bart.motd.be/tag/delicious">del.icio.us</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/54</wfw:commentRss>
 <pubDate>Sun, 22 Feb 2009 10:33:36 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">54 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/backing-delicious-bookmarks</feedburner:origLink></item>
<item>
 <title>10 Things I hate about the iPhone</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/FIEgDPGrBa4/10-things-i-hate-about-iphone</link>
 <description>&lt;p&gt;I have had an &lt;a href="http://www.apple.com/iphone"&gt;iPhone 3G&lt;/a&gt; for a while now and it is a pretty nice and fun gadget. Its not as serious as a crackberry, but it does most things I want and there are many interesting apps available for it. Believe it or not, you can even use it as a phone.&lt;/p&gt;
&lt;p&gt;There are however, many things about the iPhone that annoy me a lot. Most of them are related to the stupid artificial limitations enforced by Apple, or limitations of their software.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It vibrates when new mail is received, which is pretty normal. But it also does this while you are on a call, not a pleasant feeling.&lt;/li&gt;
&lt;li&gt;It has no scheduling for email. Apple likes to say the iPhone is ready for enterprise use, but it misses a lot of the most basic features. As someone who is on-call a lot, my phone needs to be on at night, but I don't want to be woken every time I get an email. They could even save a lot of battery power and roaming costs this way.&lt;/li&gt;
&lt;li&gt;The iPhone supports 3G but unlike other phones, no tethering. I want to be able to connect it to my laptop when i'm on the road. It is technically possible, apple just doesn't allow it.&lt;/li&gt;
&lt;li&gt;Applications aren't allowed to run in the background. The phone has such huge potential - but this silly rule limits the usefulness of many applications a lot.&lt;/li&gt;
&lt;li&gt;The keyboard is difficult to use. In some places you can turn the phone to get a larger keyboard, in others you can't. The dictionary is worthless. In true American style, they completely forgot about countries where people speak multiple languages.&lt;/li&gt;
&lt;li&gt;No search functionality. Ever tried looking for an email if you get a hundreds a day? Surprising, for the people who created spotlight.&lt;/li&gt;
&lt;li&gt;The touchscreen sometimes registers clicks twice. I kept losing emails until I eventually figured out this was because the last character of my PIN was in the exact same place as the delete button. When I unlocked the phone, it would simply delete the message I had open at the time.&lt;/li&gt;
&lt;li&gt;You can't use it as an USB storage device. So you have a phone with multiple GB of storage, that connects to your computer via an USB cable. Then why can't it be used to store files on?&lt;/li&gt;
&lt;li&gt;No indication of missed calls. On most phones there is a little led that lights up when you have a missed call, or the screen backlight lights up a little.&lt;/li&gt;
&lt;li&gt;Battery life of course. With all functionality enabled, iPhones are usually found in their natural habitat, connected to the USB port of a computer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Of course I could jailbreak the device to get around many of these limitations, but as I don't really own the device, that is not an option.&lt;/p&gt;
&lt;p&gt;All in all, I still like the iPhone, but it is far from perfect. What I dislike most, is the company behind it. Apple fanboys like bashing Windows users, while &amp;ndash; as an owner of several Apple products &amp;ndash; I believe that &lt;a href="http://www.apple.com"&gt;Apple&lt;/a&gt; is a lot worse than &lt;a href="http://www.microsoft.com"&gt;Microsoft&lt;/a&gt;. They simply hide it behind a pretty design.&lt;/p&gt;
</description>
 <comments>http://bart.motd.be/10-things-i-hate-about-iphone#comments</comments>
 <category domain="http://bart.motd.be/tag/apple">Apple</category>
 <category domain="http://bart.motd.be/tag/iphone">iPhone</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/53</wfw:commentRss>
 <pubDate>Wed, 21 Jan 2009 13:22:59 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">53 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/10-things-i-hate-about-iphone</feedburner:origLink></item>
<item>
 <title>Spam comments left by humans</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/1B9CE7dUiuk/spam-comments-left-humans</link>
 <description>&lt;p&gt;In the past few months, &lt;a href="http://www.mollom.com"&gt;Mollom&lt;/a&gt; has done a very good job blocking spam on my site. Its accuracy has increased a lot since I first installed it, nearly no spam gets through even though there are hundreds attempts a day.&lt;/p&gt;
&lt;p&gt;However, I've been seeing a different kind of spam that does get through. Comments that are left by humans, who can solve the captcha shown by Mollom. These comments are usually on-topic and at first glance appear to be legit, except that the homepage URL of the author links to a spam site. I enabled nofollow a long time ago, but that doesn't appear to make much of a difference anymore.&lt;/p&gt;
&lt;p&gt;I've even seen comments that had no link in them at all. I'm not sure what the purpose of those messages is. Maybe they are just checking whether someone removes these comments, or maybe they are trying to confuse Bayesian filters. Either way they are pretty annoying.&lt;/p&gt;
&lt;p&gt;I could enable comment moderation on this site, but that would make me the bottleneck as I don't check the queue that often. I noticed that nearly all of these comments show up on a limited number of pages. So I wrote &lt;a href="/projects/node-comment-moderation-drupal-module"&gt;a simple little module&lt;/a&gt; that allows me to enable comment moderation for individual nodes and enabled this on the pages that are targeted by these spammers.&lt;br /&gt;
This has been running for about a week now and has blocked all such messages. There have even been less attempts, possibly because of the warning message that appears in the comment form. Lets hope it stays this way so I can remove the nofollow tags on links.&lt;/p&gt;
</description>
 <comments>http://bart.motd.be/spam-comments-left-humans#comments</comments>
 <category domain="http://bart.motd.be/tag/comment">comment</category>
 <category domain="http://bart.motd.be/tag/drupal">Drupal</category>
 <category domain="http://bart.motd.be/tag/planet-drupal">Planet Drupal</category>
 <category domain="http://bart.motd.be/tag/spam">Spam</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/51</wfw:commentRss>
 <pubDate>Sat, 25 Oct 2008 10:00:39 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">51 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/spam-comments-left-humans</feedburner:origLink></item>
<item>
 <title>Modifying the vmware BIOS</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/UwdlYJQP9u8/modifying-vmware-bios</link>
 <description>&lt;p&gt;For a little project that I was working on, I needed to modify the vmware BIOS slightly. After reading &lt;a href="http://www.vmware.com/community/thread.jspa?threadID=28149&amp;amp;tstart=0"&gt;VMware BIOS modification - for Linux users&lt;/a&gt;, this turned out to be easier than I thought.&lt;/p&gt;
&lt;h3&gt;Step 1: Get the BIOS&lt;/h3&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;$ objcopy /usr/lib/vmware/bin/vmware-vmx -O binary -j .bios440 --set-section-flags .bios440=a bios440.rom.Z&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;$ perl -e 'use Compress::Zlib; my $v; read STDIN, $v, 211638; $v = uncompress($v); print $v;' &amp;lt; bios440.rom.Z &amp;gt; bios440.rom&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The value "211638" in this last line is the size of &lt;em&gt;bios440.rom.Z&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Step 2: Modify the BIOS&lt;/h3&gt;
&lt;p&gt;This is a bit more difficult. I have been told the Phoenix BIOS Editor is pretty expensive. Luckily I knew someone who could make the changes for me. &lt;/p&gt;
&lt;h3&gt;Step 3: Use the new BIOS&lt;/h3&gt;
&lt;p&gt;After you changed the BIOS to suit your needs, all that is left to do, is edit your virtual machines &lt;em&gt;.vmx file&lt;/em&gt; and append one line:&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;bios440.filename = &amp;quot;path to your BIOS file&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
</description>
 <comments>http://bart.motd.be/modifying-vmware-bios#comments</comments>
 <category domain="http://bart.motd.be/tag/bios">BIOS</category>
 <category domain="http://bart.motd.be/tag/vmware">VMWare</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/18</wfw:commentRss>
 <pubDate>Sun, 29 Jun 2008 18:48:52 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">18 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/modifying-vmware-bios</feedburner:origLink></item>
<item>
 <title>Using the varnish HTTP accelerator - Experiences so far</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/Z_qoslXlv5g/using-varnish-http-accelerator-experiences-so-far</link>
 <description>&lt;p&gt;A couple weeks ago, I started &lt;a href="http://bart.motd.be/experimenting-varnish"&gt;experimenting with varnish&lt;/a&gt; as a reverse proxy server. My setup has changed a lot since then, I like to think it improved. So here are my experiences so far.&lt;/p&gt;
&lt;h3&gt;Use -trunk (or version 2.0), not the 1.1.2 release&lt;/h3&gt;
&lt;p&gt;Initially I was using the 1.1.2 release, but I ran into a couple problems. The worst one was the &lt;em&gt;white screen of death&lt;/em&gt; for users behind a proxy server, such as squid. There was a problem with the way HTTP/1.0 requests were handled, resulting in blank pages being sent to the client.&lt;br /&gt;
The solution was to upgrade to -trunk, it contains several bug fixes and interesting new features and is pretty stable (at least at the moment). I usually don't like using the development version, but at the moment it seems to be the most reliable, and was also recommended by several people.&lt;br /&gt;
Version 2.0 will be released soon, use that one when its available.&lt;/p&gt;
&lt;p&gt;One thing to keep in mind though is that there is a problem with subroutines. This bug has been reported, so for now I'd recommend not to use them.&lt;/p&gt;
&lt;h3&gt;Don't duplicate the default VCL functions&lt;/h3&gt;
&lt;p&gt;In VCL you can have multiple functions with the same name, they will simply be concatenated. This means that you don't have to duplicate the entire default functions if you just want to add a single line. This can simplify your VCL code a lot, and you still benefit from improvements made in the default functions.&lt;br /&gt;
For an example, see my new VCL below. I'm using this in all functions except for &lt;em&gt;vcl_recv&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Again, for future reference, a copy of my new VCL code can be found below. As you can see, it has some new "features" but is simpler than the previous one. Note that the backend syntax has changed a little in trunk.&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="c geshifilter-c" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# This is the vcl.conf file for andromeda.motd.be &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;backend &lt;span class="kw1"&gt;default&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     .&lt;span class="me1"&gt;host&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;208.68.209.225&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     .&lt;span class="me1"&gt;port&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;80&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# handling of request that are received from clients.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;# decide whether or not to lookup data in the cache first.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# if we have multiple backends, we could specify them here but for now there is just the default&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;sub vcl_recv &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# If the client sent an X-Forwarded-For header, remove it. It cannot be trusted.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     unset req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;X&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Forwarded&lt;span class="sy0"&gt;-&lt;/span&gt;&lt;span class="kw1"&gt;For&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# Note that we don't need to add the client ip to the X-Forwarded-For header, varnish will do that for us&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# Handle compression correctly. Varnish treats headers literally, not&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;          &lt;span class="co2"&gt;# semantically. So it is very well possible that there are cache misses&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# because the headers sent by different browsers aren't the same.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# @see: http:// varnish.projects.linpro.no/wiki/FAQ/Compression&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding ~ &lt;span class="st0"&gt;&amp;quot;gzip&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;               &lt;span class="co2"&gt;# if the browser supports it, we'll use gzip&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;               set req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;gzip&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; elsif &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding ~ &lt;span class="st0"&gt;&amp;quot;deflate&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;               &lt;span class="co2"&gt;# next, try deflate if it is supported&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;               set req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;deflate&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; &lt;span class="kw1"&gt;else&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;               &lt;span class="co2"&gt;# unknown algorithm. Probably junk, remove it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;               unset req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="co2"&gt;# If we get a request for a page that has just been requested by another thread and&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# is still being fetched from the backend, allow serving a cached page so long as it hasn't&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# expired more than 30 seconds ago (prevents thread pileup on cache refreshes).&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# Note that this only works if obj.grace is also set:&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;#     &amp;quot;If no in-ttl object was found AND we have a graced object AND it is also&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="co2"&gt;#      graced by req.grace AND it is being fetched: serve the graced object.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     set req.&lt;span class="me1"&gt;grace&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; 30s&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# the default vcl_recv will only look up objects in the cache if there is no cookie&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# present in the request. Therefor, we remove the cookie header from all requests for&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="co2"&gt;# files which we know to be static.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# These are drupal-specific:&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# - everything in most of the standard drupal directories.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# - txt and ico files (most important: robots.txt and favicon.ico)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;url&lt;/span&gt; ~ &lt;span class="st0"&gt;&amp;quot;^/(files|misc|sites|themes|modules)/&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;||&lt;/span&gt; req.&lt;span class="me1"&gt;url&lt;/span&gt; ~ &lt;span class="st0"&gt;&amp;quot;&lt;span class="es0"&gt;\.&lt;/span&gt;(txt|ico)$&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         unset req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Cookie&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# No final action. Continues in the default vcl_recv which will only look up&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="co2"&gt;# items from the cache for GET and HEAD requests without cookies.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when entering pipe mode&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;sub vcl_pipe &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# If we don't set the Connection: close header, any following&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# requests from the client will also be piped through and&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# left untouched by varnish. We don't want that.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     set req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;connection&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;close&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# Note: no &amp;quot;pipe&amp;quot; action here - we'll fall back to the default&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# pipe method so that when any changes are made there, we&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# still inherit them.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when the requested object has been retrieved from the&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# backend, or the request to the backend has failed&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;sub vcl_fetch &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;obj.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Pragma&lt;/span&gt; ~ &lt;span class="st0"&gt;&amp;quot;no-cache&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;||&lt;/span&gt; obj.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Cache&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Control ~ &lt;span class="st0"&gt;&amp;quot;(no-cache|no-store|private)&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# varnish by default ignores Pragma and Cache-Control headers. It&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# only looks at the &amp;quot;max-age=&amp;quot; value in the Cache-Control header to&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;          &lt;span class="co2"&gt;# determine the TTL. So we need this rule so that the cache respects&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# the wishes of the backend application.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;obj.&lt;span class="me1"&gt;ttl&lt;/span&gt; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt; 180s&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# force minimum ttl of 3 minutes for all cached objects.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          set obj.&lt;span class="me1"&gt;ttl&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; 180s&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="co2"&gt;# set the grace period for this object to a maximum of 30s. This is how&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# long after its expire time, it is still allowed to be served from cache if&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# directed to do so by vcl_recv. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     set obj.&lt;span class="me1"&gt;grace&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; 30s&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Authorization&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="sy0"&gt;!&lt;/span&gt;obj.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Cache&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Control ~ &lt;span class="st0"&gt;&amp;quot;public&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# don't allow caching pages that are protected by basic authentication&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# unless when they explicitly set the cache-control to public.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# Note: no final action - continue in the default vcl_fetch&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
</description>
 <comments>http://bart.motd.be/using-varnish-http-accelerator-experiences-so-far#comments</comments>
 <category domain="http://bart.motd.be/tag/http-accelerator">HTTP Accelerator</category>
 <category domain="http://bart.motd.be/tag/varnish">Varnish</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/48</wfw:commentRss>
 <pubDate>Sun, 29 Jun 2008 18:42:53 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">48 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/using-varnish-http-accelerator-experiences-so-far</feedburner:origLink></item>
<item>
 <title>Experimenting with Varnish</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/cEFVFMGb-sE/experimenting-with-varnish</link>
 <description>&lt;p&gt;As a little experiment, &lt;a href="http://bart.motd.be"&gt;my blog&lt;/a&gt; is now running behind a &lt;a href="http://varnish.projects.linpro.no"&gt;Varnish&lt;/a&gt; http accelerator. While squid can be used for this purpose as well, its primary function is a forward proxy. Varnish on the other hand is &lt;a href="http://varnish.projects.linpro.no/wiki/ArchitectNotes"&gt;designed&lt;/a&gt; to be a very fast caching reverse proxy server.&lt;/p&gt;
&lt;p&gt;I initially tried using the debian etch package of Varnish, but it is a bit outdated. So I ended up building my own package from source. It took a bit of research to configure everything correctly but all in all the configuration was pretty simple and it is easy to read. After a few weeks, I still know what it all means.&lt;/p&gt;
&lt;p&gt;There are a few gotchas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There isn't much documentation.&lt;/li&gt;
&lt;li&gt;It will refuse to start if /tmp is mounted &lt;em&gt;"noexec"&lt;/em&gt;.
&lt;/li&gt;&lt;li&gt;Turn off KeepAlives on the backend Apache servers, otherwise you might experience delays when requesting pages.&lt;/li&gt;
&lt;li&gt;The VCL &lt;em&gt;"pass"&lt;/em&gt; action does not support POST requests. You might come across older configuration examples on the internet that use the "pass" action but that simply doesn't work. You need to use the &lt;em&gt;"pipe"&lt;/em&gt; action.&lt;/li&gt;
&lt;li&gt;Varnish will only respect the &lt;em&gt;max-age&lt;/em&gt; parameter of &lt;em&gt;Cache-Control&lt;/em&gt; header by default. Any other values such as those indicating whether or not an object may be cached, will be ignored by default. You need to include some code in your VCL configuration file to handle these headers correctly (see example below).&lt;/li&gt;
&lt;li&gt;If you need a large cache (multiple GBs), you need a 64bit system.&lt;/li&gt;
&lt;li&gt;There is no persistent cache. Every time you restart varnish, the cache gets wiped. So don't restart unless you really need to.&lt;/li&gt;
&lt;li&gt;During load testing, new requests would sometimes hang and &lt;em&gt;ip_conntrack: table full: packet dropped&lt;/em&gt; was logged. This wasn't a problem with Varnish but the firewall which couldn't handle that many connections. Increasing the value in &lt;em&gt;net/ipv4/netfilter/ip_conntrack_max&lt;/em&gt; fixed that.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All in all, Varnish seems to work pretty well. It can still be improved in many areas but thats to be expected for a v1 release.&lt;br /&gt;
Time for me to start testing this on a larger websites.&lt;/p&gt;
&lt;p&gt;For future reference, below is the configuration file I've been using.&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="c geshifilter-c" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# configuration file for andromeda&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;backend &lt;span class="kw1"&gt;default&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     set backend.&lt;span class="me1"&gt;host&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;208.68.209.225&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     set backend.&lt;span class="me1"&gt;port&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;80&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;       &lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Block unwanted clients&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;acl blacklisted &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="st0"&gt;&amp;quot;192.168.100.100&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# handling of request that are received from clients.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# decide whether or not to lookup data in the cache first.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;sub vcl_recv &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="co2"&gt;# reject malicious requests&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     call vcl_recv_sentry&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;GET&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;HEAD&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;PUT&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;TRACE&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;OPTIONS&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;DELETE&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# Non-RFC2616 or CONNECT which is weird.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         pipe&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Expect&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# Expect is just too hard at present. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         pipe&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;GET&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; req.&lt;span class="me1"&gt;request&lt;/span&gt; &lt;span class="sy0"&gt;!=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;HEAD&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# we only deal with GET and HEAD&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# note that we need to use &amp;quot;pipe&amp;quot; instead of &amp;quot;pass&amp;quot; here. Pass isn't supported for&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          &lt;span class="co2"&gt;# POST requests&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;          pipe&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Authorization&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# don't cache pages that are protected by basic authentication&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# Handle compression correctly. Varnish treats headers literally, not&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# semantically. So it is very well possible that there are cache misses&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# because the headers sent by different browsers aren't the same.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         &lt;span class="co2"&gt;# For more info: http:// varnish.projects.linpro.no/wiki/FAQ/Compression&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding ~ &lt;span class="st0"&gt;&amp;quot;gzip&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;              &lt;span class="co2"&gt;# if the browser supports it, we'll use gzip&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;              set req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;gzip&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; elsif &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding ~ &lt;span class="st0"&gt;&amp;quot;deflate&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;              &lt;span class="co2"&gt;# next, try deflate if it is supported&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;              set req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;deflate&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; &lt;span class="kw1"&gt;else&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;              &lt;span class="co2"&gt;# unknown algorithm. Probably junk, remove it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;              remove req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Accept&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Encoding&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;url&lt;/span&gt; ~ &lt;span class="st0"&gt;&amp;quot;&lt;span class="es0"&gt;\.&lt;/span&gt;(jpg|jpeg|gif|png|css|js)$&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# allow caching of all images and css/javascript files&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         lookup&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;url&lt;/span&gt; ~ &lt;span class="st0"&gt;&amp;quot;^/files&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# anything in drupals files directory is static and may be cached &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         lookup&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;req.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Cookie&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# Not cacheable by default&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# TODO: do we even need this? Can't we simply make sure dynamic&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# content never exists in the cache?&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="co2"&gt;# every thing else we try to look up in the cache first&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     lookup&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when entering pipe mode&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#sub vcl_pipe {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#     pipe;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when entering pass mode&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#sub vcl_pass {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     pass;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when entering an object into the cache&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#sub vcl_hash {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     set req.hash += req.url;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#     if (req.http.host) {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#          set req.hash += req.http.host;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     } else {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#          set req.hash += req.http.host;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     }&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#     hash;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when the requested object was found in the cache&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;sub vcl_hit &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="sy0"&gt;!&lt;/span&gt;obj.&lt;span class="me1"&gt;cacheable&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# A response is considered cacheable if all of the following are true:&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# - it is valid&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         &lt;span class="co2"&gt;# - HTTP status code is 200, 203, 300, 301, 302, 404 or 410&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# - it has a non-zero time-to-live when Expires and Cache-Control headers are taken into account.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     deliver&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when the requested object was not found in the cache&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#sub vcl_miss {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     fetch;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;# Called when the requested object has been retrieved from the&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# backend, or the request to the backend has failed&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;sub vcl_fetch &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="sy0"&gt;!&lt;/span&gt;obj.&lt;span class="me1"&gt;valid&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         &lt;span class="co2"&gt;# don't cache invalid responses.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         error&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="sy0"&gt;!&lt;/span&gt;obj.&lt;span class="me1"&gt;cacheable&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# A response is considered cacheable if all of the following are true:&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         &lt;span class="co2"&gt;# - it is valid&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# - HTTP status code is 200, 203, 300, 301, 302, 404 or 410&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# - it has a non-zero time-to-live when Expires and Cache-Control headers are taken into account.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# If a response is not cachable, simply pass it along to the client.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;obj.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Set&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Cookie&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# don't cache content that sets cookies (eg dynamic PHP pages).&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;obj.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Pragma&lt;/span&gt; ~ &lt;span class="st0"&gt;&amp;quot;no-cache&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;||&lt;/span&gt; obj.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Cache&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Control ~ &lt;span class="st0"&gt;&amp;quot;no-cache&amp;quot;&lt;/span&gt; &lt;span class="sy0"&gt;||&lt;/span&gt; obj.&lt;span class="me1"&gt;http&lt;/span&gt;.&lt;span class="me1"&gt;Cache&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;Control ~ &lt;span class="st0"&gt;&amp;quot;private&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# varnish by default ignores Pragma and Cache-Control headers. It&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# only looks at the &amp;quot;max-age=&amp;quot; value in the Cache-Control header to&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# determine the TTL. So we need this rule so that the cache respects&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         &lt;span class="co2"&gt;# the wishes of the backend application.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         pass&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;obj.&lt;span class="me1"&gt;ttl&lt;/span&gt; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt; 180s&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;         &lt;span class="co2"&gt;# force minimum ttl of 180 seconds for all cached objects.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;         set obj.&lt;span class="me1"&gt;ttl&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; 180s&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     insert&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called before a cached object is delivered to the client&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#sub vcl_deliver {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     deliver;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Called when an object nears its expiry time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;#sub vcl_timeout {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     discard;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&lt;span class="co2"&gt;# Called when an object is about to be discarded&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#sub vcl_discard {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#     discard;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;# Custom routine to detect malicious requests and reject them (called by vcl_recv).&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;sub vcl_recv_sentry &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;client.&lt;span class="me1"&gt;ip&lt;/span&gt; ~ blacklisted&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;          error &lt;span class="nu0"&gt;503&lt;/span&gt; &lt;span class="st0"&gt;&amp;quot;Your IP has been blocked.&amp;quot;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;     &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
</description>
 <comments>http://bart.motd.be/experimenting-with-varnish#comments</comments>
 <category domain="http://bart.motd.be/tag/http-accelerator">HTTP Accelerator</category>
 <category domain="http://bart.motd.be/tag/varnish">Varnish</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/47</wfw:commentRss>
 <pubDate>Sat, 19 Apr 2008 13:29:19 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">47 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/experimenting-with-varnish</feedburner:origLink></item>
<item>
 <title>Configuring an IPv6 tunnel on a netscreen SSG firewall</title>
 <link>http://feedproxy.google.com/~r/BartJansens/~3/Iy9Y3SZY4gU/configuring-ipv6-tunnel-netscreen-ssg-firewall</link>
 <description>&lt;p&gt;I have a netscreen SSG firewall from which I wanted to establish a tunnel to &lt;a href="http://www.sixxs.net"&gt;SixXS&lt;/a&gt;. I tried this in the past when IPv6 support had just been added, but didn't have much luck. However, nowadays it works pretty well. I've had a working tunnel for about a year now.&lt;/p&gt;
&lt;p&gt;The first thing to do is to get a tunnel to an IPv6 broker and request a subnet for your internal systems. Personally I use &lt;a href="http://www.sixxs.net"&gt;SixXS&lt;/a&gt; but you can probably use any broker you like. As an example, I'll be using these settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tunnel broker ipv4 address: 127.34.8.97&lt;/li&gt;
&lt;li&gt;Tunnel ipv6 address: 2001:DB8:202:123::2/64&lt;/li&gt;
&lt;li&gt;ipv6 subnet used internally: 2001:DB8:8AA:1::/64&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Second, start by upgrading your device to the latest available firmware. IPv6 support is constantly improving as support for more ALGs is added. If you still have a 5GT, you're stuck using 5.4 but if you have an SSG, you can upgrade to 6.0 or even 6.1.&lt;/p&gt;
&lt;p&gt;Next, enable IPv6 support on the device. It's not enabled by default so you have to change a boot parameter and restart the device. You can only do this from the CLI:&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set envar ipv6=yes&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After the device has rebooted, you'll see that there are a few new commands available to configure IPv6 on interfaces and use IPv6 addresses in policies. Next we'll begin configuring the tunnel to our tunnel broker. I'd recommend doing this from the CLI when you are using version 5.4 because the WebUI had some bugs back then.&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.1 zone &amp;quot;Untrust&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.1 ipv6 mode &amp;quot;host&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.1 ipv6 ip 2001:DB8:202:123::2/64&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.1 ipv6 enable&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;set interface tunnel.1 tunnel encap ip6in4 manual&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.1 tunnel local-if adsl2/0 dst-ip 127.34.8.97&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.1 mtu 1280&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set route ::/0 interface tunnel.1 gateway :: preference 20&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This should give you a working tunnel and allow you to ping IPv6 addresses from the netscreen itself. Next we'll assign an IPv6 address to our internal interface and configure it so that the attached systems will get an autoconfigured address:&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface ethernet0/1 ipv6 mode &amp;quot;router&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface ethernet0/1 ipv6 ip 2001:DB8:8AA:1::1/64&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface ethernet0/1 ipv6 enable&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;unset interface ethernet0/1 ipv6 ra link-address&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;set interface ethernet0/1 ipv6 ra transmit&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface ethernet0/1 ipv6 nd nud&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That should give your internal systems an IPv6 address. All that is left now is configure a policy to allow the IPv6 traffic to pass through. Configuring this is just like when you are using IPv4, except that there now isn't an object named "Any" anymore but there are two, "Any-IPv4" and "Any-IPv6".&lt;br /&gt;
A simple policy to allow outbound connections would be:&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set policy from &amp;quot;Trust&amp;quot; to &amp;quot;Untrust&amp;quot; &amp;quot;Any-IPv6&amp;quot; &amp;quot;Any-IPv6&amp;quot; &amp;quot;ANY&amp;quot; permit log&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Of course, I'd recommend to make them a bit more restrictive. Be very careful with rules from Untrust to Trust. All your internal systems will have a public IP address, don't just allow everything or you might wake up one morning and find something like this:&lt;br /&gt;
&lt;a href="http://www.ibiblio.org/Dave/ar00410.htm"&gt;&lt;img src="http://bart.motd.be/files/df20030604.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One thing to keep in mind when you are updating your policies is that you cannot have both IPv4 and IPv6 addresses in one address group. This effectively means that you will have separate policies in your rulebase for IPv4 and IPv6, so try to keep them ordered logically.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update sept 13, 2009&lt;/strong&gt;&lt;br /&gt;
I recently set up another IPv6 tunnel, this time on a netscreen 5GT running ScreenOS 6.2r3. I decided to incorporate some of the feedback from the comments below, so that the netscreen can be pinged by SixXS for monitoring. The netscreen should respond to pings on its tunnel interface, but doesn't do so for IPv6 traffic, a bug which has been reported to Juniper but which has not yet been fixed.&lt;/p&gt;
&lt;p&gt;So instead of putting my IPv6 endpoint address on the tunnel interface, I used a loopback interface, with a /128 subnet mask. Then I created the tunnel interface as before, but making it unnumbered, inheriting the address from the loopback interface:&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface &amp;quot;loopback.1&amp;quot; zone &amp;quot;Untrust&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface &amp;quot;loopback.1&amp;quot; ipv6 mode &amp;quot;host&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface &amp;quot;loopback.1&amp;quot; ipv6 ip 2001:DB8:202:123::2/128&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface &amp;quot;loopback.1&amp;quot; ipv6 enable&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;set interface loopback.1 route&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface loopback.1 manage ping&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;unset interface loopback.1 ipv6 nd nud&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.6 ip unnumbered interface loopback.1&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;set interface &amp;quot;tunnel.6&amp;quot; ipv6 mode &amp;quot;host&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface &amp;quot;tunnel.6&amp;quot; ipv6 enable&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.6 tunnel encap ip6in4 manual&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.6 tunnel local-if adsl2/0 dst-ip 127.34.8.97&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set interface tunnel.6 mtu 1280&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;! had to disable NUD otherwise the tunnel interface state changed to down.&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;unset interface tunnel.6 ipv6 nd nud&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set route ::/0 interface tunnel.6 gateway :: preference 20&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;! note: an explicit policy is only needed when intra-zone blocking is enabled on the Untrust zone&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;set policy name &amp;quot;SixXS monitoring&amp;quot; from &amp;quot;Untrust&amp;quot; to &amp;quot;Untrust&amp;quot;  &amp;quot;Any-IPv6&amp;quot; &amp;quot;2001:DB8:202:123::2/128&amp;quot; &amp;quot;ICMP6 Echo Request&amp;quot; permit&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This works perfectly. Because my external interface IP is dynamic on this device, I set the SixXS tunnel type to &lt;em&gt;Heartbeat&lt;/em&gt; and installed AICCU on an internal machine to keep the connection alive.&lt;/p&gt;
</description>
 <comments>http://bart.motd.be/configuring-ipv6-tunnel-netscreen-ssg-firewall#comments</comments>
 <category domain="http://bart.motd.be/tag/ipv6">IPv6</category>
 <category domain="http://bart.motd.be/tag/netscreen">Netscreen</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bart.motd.be/crss/node/46</wfw:commentRss>
 <pubDate>Sun, 06 Apr 2008 08:57:58 +0000</pubDate>
 <dc:creator>Bart</dc:creator>
 <guid isPermaLink="false">46 at http://bart.motd.be</guid>
<feedburner:origLink>http://bart.motd.be/configuring-ipv6-tunnel-netscreen-ssg-firewall</feedburner:origLink></item>
</channel>
</rss>
