My first reaction was to consider a web service with ssl, but developing a web service from scratch seems too lengthy.īecause of that I have been thinking of using an ssh tunnel in order to secure the traffic. The connection is of course insecure and all requests (with quite a bit of sensitive data, such as passwords) and responses are transmitted as plain text. If you’re not looking for all this functionality or want to review the options, check out this link: iPhone/iPod Touch in Ubuntu.I am developing an iPhone application which is communicating with a remote service over a tcp socket connection (the service actually listens on telnet and takes telnet commands too). That being said, it’s an amazing program and I don’t know of anything else out there that does the same thing. It only allows you to open one SSH session - though others can be, has to be restarted if the connection breaks, and will occasionally just stop working. IssuesĪlthough itunnel is an amazing utility, it has quite a few bugs. If you want, you can find more information on using APT, a packaging tool also used in the Debian Linux distribution. You’ll need to run this as root on the iPhone, so remember the root password you set when you jailbroke it (this defaults to “alpine”, but you should really change it), and change users with “su”. So if you don’t want to wait for Cydia to load, try “apt-get upgrade installed” to upgrade your installed programs, “apt-cache search programname” to search for a program, and “apt-get install programname” to install programname. Once you have an ssh tunnel up, you’re logged into your iPhone! Apt and its associated utilities (apt-get, apt-cache, etc.) are what Cydia really interfaces with. Also, keep in mind that you might also need to install something (probably available from Cydia) to allow your iPhone to bridge the connection properly. There is a more in-depth itunnel tutorial provided by the program’s maker. You also need to set up DNS to work right, by typing about:config in the address bar and setting _remote_dns=true (just scroll down to the entry and change it.) Don’t forget that you’ve set this if you want to use some other proxy later, you’ll have to change it back. After itunnel connects just SSH to port 3023, and you’re in! To enable tethering, use the command “ssh -D someportnumber -p 3023 ” and type in the password you set for the mobile when you set up the iPhone (the default should be “alpine”) then make Firefox use port someportnumber (which you specified above) as a SOCKS proxy. The default port for the tunnel is 3023, but if you run itunnel with a port number as its argument, you can change this. However, once it gives you the “successfully got device/server waiting for ssh connection” message, you’re in luck! You now have a working connection to the iPhone. You also might have to run itunnel with root access. You might have to run it two or three times to get a connection and might have to unplug your iPhone and plug it back in the software isn’t perfect. Just run it on the command line the output of the command is important to determine when it successfully connects. It’s simple to use, but unfortunately doesn’t always work quite right. The binary is the file labeled itunnel if you want to be able to run it from the command line just by typing “itunnel”, move it to /usr/bin or /usr/local/bin. The download contains a binary (the program) and the source code. It is free, open source, and fairly easy to setup and use. The only program I know of that allows tethering and SSH tunneling is itunnel. You are responsible for making sure it’s legal. Also, if you are going to be using the iPhone’s data connection on your computer, make sure that you check the agreement you have with your cell phone company. This means that you will be doing it somewhat at your own risk. Keep in mind that this method does require a jailbroken iPhone or iPod Touch because it relies on OpenSSH, which is a program you can easily install through Cydia. This is especially useful if you have a data plan on your iPhone but not on the computer because it allows you to get Internet access on the computer anywhere you can get on the mobile network. Although there are quite a few ways to connect an iPhone or iPod Touch to a computer running Linux, most of them only allow you to transfer files, not share Internet connections or run commands on the iPhone from your computer. Tethering is the process of connecting one device (the iPhone) to another (your computer) and sharing an Internet connection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |