Chug Blogs

Tag Archives for: jailbreak

Install DNS2TCP on iOS

28 April 2014 by CHP

High Level Tutorial to install dns2tcp and use it on your iOS device.


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)

tunnel      IN      A
d2t           IN      NS

replace with the ip address of your Ubuntu/debian server
replace with a domain name in your control


Server configuration

Install dns2tcp:

sudo apt-get install dns2tcp

cat > /etc/dns2tcpd.conf <<EOF
listen =
port = 53
user = nobody
key = password
chroot = /tmp/dns2tcp/
domain =
ressources = ssh:

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 -k password -d 1 -l 2222 -r ssh
starts the dns2tcp tunnel ready to accept ssh connections on port 2222

ssh -D 1080 -p 2222 root@
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:


Leave a comment | Categories: Uncategorized | Tags: , , , ,