Giter Site home page Giter Site logo

upnp_tunnel_updater's Introduction

UPnP-based tunnelbroker.net endpoint updater

Hurricane Electric offers free IPv6 over IPv4 tunnels, but requires the endpoint to be aware of your own IPv4 endpoint in order for the tunnel to operate (which makes perfect sense - it is an IP-based tunnel which has no awareness of connections and needs to know where to forward inbound packets).

If you are on a dynamic IP address (especially one that changes as frequently as mine), this poses a small problem. There are a variety of methods available to you such as Dynamic DNS updaters, adding shell scripting to a field in your router if it is Linux-based, etc. Actually there is no shortage of solutions at all. I chose to implement something using Universal Plug'n'Play for several reasons:

  • My router's ability to run DynDNS updating scripts is fairly limited, and quite unreliable.
  • I cannot (easily) have a script running that updates both my tunnel broker endpoint and actual DynDNS.
  • It seems unnecessary to have to go out to the internet (e.g. one of the many "what is my IP"-style sites) just to figure out your public address.
  • I wanted to learn about UPnP.
  • There's always time for more Go programming.

References

Building

  • Download and configure Golang (at least 1.2 recommended)
  • go fmt; go build

Running

./upnp_tunnel_updater \
  -user-id=<USERID> \
  -password=<PASSWORD> \
  -tunnel-id=<TUNNEL_ID>

You can also specify -noop to find the IP but not update the Tunnelbroker configuration.

A local cache file will be saved (named by default .upnp_tunnel_updater.cache) in the current directory, with the current IP address. This will be checked on each run to avoid making unnecessary updates to the Tunnelbroker config.

TODO

  • Subscribing to the event endpoint and remaining resident for continuous updates.
  • Code cleanup.

upnp_tunnel_updater's People

Contributors

ohookins avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.