![]() |
2007-09-18
, 08:53
|
|
Posts: 2,142 |
Thanked: 2,054 times |
Joined on Dec 2006
@ Sicily
|
#62
|
![]() |
2007-10-30
, 06:01
|
|
Posts: 739 |
Thanked: 242 times |
Joined on Sep 2007
@ Montreal
|
#63
|
Today I successfully established a DNS tunnel with iodine. I tested it at different hotspots from two of the major wireless operators in Sweden. Both are using unencrypted networks with web login.
Here is my recipe (exchange mytunnel.mydomain.com with your subdomain):
Run iodined on your server:
Choose a password.Code:iodined -f 10.9.0.1 mytunnel.mydomain.com
Save this shell script on your tablet and run it as root. It will change the default gateway so all traffic is routed through the tunnel. Enter the password you chose above when asked:
This script makes a few assumptions on the output of the route command but it has worked for me.Code:#!/bin/sh DOMAIN="mytunnel.mydomain.com" IFACE="wlan0" RESOLV="/tmp/resolv.conf" GW=`route -n | tail -1 | cut -d ' ' -f 10` for NS in `grep nameserver $RESOLV.$IFACE | cut -d ' ' -f 2` do echo route add $NS gw $GW $IFACE route add $NS gw $GW $IFACE done echo iodine $NS $DOMAIN iodine $NS $DOMAIN route del default route add default gw 10.9.0.1 dns0
To stop the tunnel, run:
This will not restore the default gateway. Just reconnect to the network if you want it back.Code:killall iodine
The key issue was enabling ip masquerade - my ubuntu feisty box had not that by default. The simplest guide to do that was in http://www.ibiblio.org/pub/Linux/doc...ple-HOWTO.html.
No need for hacking routing tables on my wi-fi router.
Now I can invoke iodined server in a root terminal by doing
The thing seems slow though. Since I don't have hotels or airports or other pay-per-connect wireless networks nearby, I have tested it using a gprs connection on my IT, so most likely it is going to be quicker when using the real thing.
Do I need it? No, because I have flat gprs. Did I enjoy troubleshooting? Yes a lot