Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up a (Hurricane Electric) IPv6 tunnel from my laptop running 12.04. Works fine, and allows me to test the dual-stack configuration on my remote webservers etc. until native IPv6 is available on my ISP.

However, there are times when I don't want the tunnel. For example if I'm accessing something that requires an IPv4 address in my own country rather than the Tunnelbroker tunnel endpoint, or if I'm away from the local IPv4 tunnel endpoint, or if I simply want to test without IPv6.

Is there a simple way to disable and then re-enable the IPv6 tunnel, without rebooting?

For context, here's what's in my /etc/network/interfaces (NNN replaces numbers):

auto he-ipv6
iface he-ipv6 inet6 v4tunnel
  endpoint 216.218.NNN.NNN
  address  2001:470:NNN:NNN::2
  netmask  64
  up ip -6 route add default dev he-ipv6
  down ip -6 route del default dev he-ipv6

Is there a network manager application (gui or command line) to selectively enable/disable parts of /etc/network/interfaces, or IPv6 in general? I found even by commenting out that out (and reloading networking) it's tough to get the IPv6 to go away. A "tunnel on/off" button in networking would be great, like using a VPN.

share|improve this question
up vote 2 down vote accepted

Have you tried ifup/ifdown?

  • ifup he-ipv6

  • ifdown he-ipv6

share|improve this answer
Thank you, that's exactly what I need (with sudo added). With only one network interface before I've never needed to know how to turn on/off a particular interface. Does the job fine. – Rob Hoare Oct 29 '12 at 0:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.