A rule-based tunnel