Posts for: #Script

how to manually create a 6in4 tunnel

I’m doing some IPv6 codig for a client and needed to setup a bunch of 6in4 tunnels.

Thre are many ways to do this through distribution init scripts (Debian, Fedora), but I wanted something less permanent and more dynamic for testing.

The procedure can be summarized in these steps:

  • create a tunnel mytun between local 1.1.1.1 and remote 2.2.2.2

      ip tunnel add mytun mode sit local 1.1.1.1 \
                      remote 2.2.2.2 ttl 64 dev eth0
    
  • give the local end an address

      ip addr add dev mytun f8c0::1.1.1.1/64
    
  • bring up the tunnel

      ip link set dev mytun up
    
Read more →

shrinking URLs

I wrote a short script to shrink URLs:

    % shorturl http://www.jukie.net/~bart/shorturl
    http://2tu.us/ce8

    % shorturl
    Type in some urls and I'll try to shrink them for you...
    http://www.jukie.net/~bart/shorturl
    http://2tu.us/ce8
    http://www.jukie.net/~bart/20090320214228
    http://2tu.us/ce9

I am doing this as part of my new identi.ca addiction^W usage and extending GregKH’s command line micro blogging tool.

UPDATE: also picked up by @vando for use with mcabber.

Read more →