vtun

On a conference for sociologists in Glasgow, I found my self in a library providing "Open Access" to the internet. However, the access was filtered, only traffic bound for port 80 was let through. Not even ping was accepted (dns-queries was handled alright of course).

I wanted to send mail that I had already written on my laptop, and I wanted to log in to my computer at work to do computing work there. Thirdly, I had gpg-encrypted mail that I could not read using webmail. Lastly, I wanted to hack me out of this web-jail the library tried to restrict me in.

On the computers provided for visistors to the library, I was able to connect to the desktop on a windows-server at work ("remote desktop"), and from there to log in on my main computer at work with putty. Then I installed vtun on that box and configured it to listen on port 80.

On my laptop I installed vtun (easy, since apt-get uses http:// over port 80) and configured it to connect to port 80 on my computer at work.

Before I had unrestricted internet-access from the library, I had to fix three things

  1. Set up ip_forwarding on the server
  2. Fix the routing-table on the client
  3. Fix the path for DNS-queries (since the library happened to give a private network address for DNS)

The concepts used

term meaning
client my laptop in the library
server.bar.com my computer at work
gateway.given.by.library the gateway that the library supplied (with DHCP)
10.1.0.1 the address of the my computer at work within the IP-tunnel (vtun).

Set up ip_forwarding on the server

# echo 1 > /proc/sys/net/ipv4/ip_forward

Fix the routing-table on the client

route add server.bar.com gw gateway.given.by.library
route del default
route add default gw 10.1.0.1

Fix the path for DNS-queries

Simply copy the /etc/resolv.conf from the server.

A Win-win-solution

The library is not responsible for all junk that comes out of my laptop. All network-packets it generates will seem to come from my computer at work, which is what everybody wants.

comments powered by Disqus


Back to the index

Blog roll

R-bloggers, Debian Weekly
Valid XHTML 1.0 Strict [Valid RSS] Valid CSS! Emacs Muse Last modified: 2007-09-05