Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've set up a tunnelbroker.net (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
add comment

1 Answer 1

up vote 1 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
add comment

Your Answer

 
discard

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.