tspc: Debian / Ubuntu Linux Configure IPv6 Tunnel

Q. How do I configure IPv6 Tunnel under Ubuntu Linux? I’d like to browse and use IPv6 utilities under Ubuntu but my ISP is not ready with IPv6 native transport. How do I browser IPv6 ready websites using IPv4?

A. You can easily set IPv6 tunnel under Debian or Ubuntu Linux using tspc (tunnel setup protocol client). tspc provides a mean to configure a tunnel obtained from a tunnel server which is compliant to the tunnel setup protocol (TSP). tspc will connect to a tunnel server and request a tunnel according to the specifications inside the configuration file. As a background process, it will then monitor the state of the tunnel. In the event of a timeout, tspc will reestablish a new tunnel. tspc allows you to connect and browse IPv6 network using IPv4.

Register Free at Freenet6

You can get free IPv6 access through Freenet6. Visit Freenet6 and register yourself to obtain username and password.

Install tspc client

Open terminal and type the following command:
$ sudo apt-get install tspc
# apt-get install tspc

Configure tspc

The default configuration file is located at /etc/tsp/tspc.conf. Open file using a text editor, enter:
# vi /etc/tsp/tspc.conf
You need to provide username, password and hostname registered at Freenet6 (see your tunnel broker registration email). For example,

  • userid – vivek
  • passwd – myPassWord
  • server – broker.freenet6.net

Search, userid, server, and passwd variable in file and set them as follows:

Save and close the file. Restart tspc service, enter
$ sudo /etc/init.d/tspc restart
Run ifconfig command to see your tunnel IPv6 address, enter:
$ /sbin/ifconfig tun
Sample output:

tun       Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet6 addr: 2001:5c0:8fff:fffe::a68d/128 Scope:Global
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:656 (656.0 b)  TX bytes:240 (240.0 b)

Test IPv6 connectivity, enter:
$ ping6 ipv6.google.com
Sample output:

PING ipv6.google.com(2001:4860:0:2001::68) 56 data bytes
64 bytes from 2001:4860:0:2001::68: icmp_seq=1 ttl=55 time=501 ms
64 bytes from 2001:4860:0:2001::68: icmp_seq=2 ttl=55 time=453 ms
64 bytes from 2001:4860:0:2001::68: icmp_seq=3 ttl=55 time=437 ms
64 bytes from 2001:4860:0:2001::68: icmp_seq=4 ttl=55 time=473 ms

--- ipv6.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 437.077/466.544/501.926/24.149 ms

View Google.com IPv6 Address, enter:
$ host ipv6.google.com
Sample output:

ipv6.google.com is an alias for ipv6.l.google.com.
ipv6.l.google.com has IPv6 address 2001:4860:0:2001::68

Now you can browse any IPv6 configured website or use all IPv6 utilities such as ping6, tracerout6 without a problem.

How do I stop tunnel?

Open the terminal and type the command, enter:
$ sudo /etc/init.d/tspc stop
$ /sbin/ifconfig

How do I start tunnel?

Open the terminal and type the command, enter:
$ sudo /etc/init.d/tspc start
$ /sbin/ifconfig
$ ping6 ipv6.google.com

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.