Install DNS2TCP on iOS
by CHPHigh Level Tutorial to install dns2tcp and use it on your iOS device.
Prerequisites:
Ubuntu/debian server
domain name
jailbroken iOS device
Configure your domain and create a subdomain:
Create an A record and NS record (check with your domain registrar)
example:
tunnel IN A 101.102.103.104
d2t IN NS tunnel.yourdomain.com
replace 101.102.103.104 with the ip address of your Ubuntu/debian server
replace yourdomain.com with a domain name in your control
Server configuration
Install dns2tcp:
sudo apt-get install dns2tcp
cat > /etc/dns2tcpd.conf <<EOF
listen = 101.102.103.104
port = 53
user = nobody
key = password
chroot = /tmp/dns2tcp/
domain = d2t.yourdomain.com
ressources = ssh:127.0.0.1:22
EOF
Run dns2tcp:
dns2tcpd -d 1 -f /etc/dns2tcpd.conf
Client Configuration
Install MobileTerminal, OpenSSH, and dns2tcp on your jailbroken device.
Run in MobileTerminal:
dns2tcpc -z d2t.yourdomain.com -k password -d 1 -l 2222 -r ssh 101.102.103.104
starts the dns2tcp tunnel ready to accept ssh connections on port 2222
ssh -D 1080 -p 2222 [email protected]
starts a ssh tunnel for SOCKS proxy
Configure iOS to use SOCKS proxy:
Download iOS pac file
Save it to /private/var/root/proxy.pac
Navigate to Settings > Wi-Fi > <your network> > HTTP Proxy > Auto
Enter file:///private/var/root/proxy.pac
in the URL
All data on your iOS device should now be tunneling through your SOCKS proxy over DNS!
Further reading:
http://blog.rootshell.be/2007/03/22/dns2tcp-how-to-bypass-firewalls-or-captive-portals/
http://www.hsc.fr/ressources/outils/dns2tcp/download/README
http://www.antd.org/ios/socks-proxy-ssh-on-iphone-ipad/