Archive

Posts Tagged ‘linux’

iPhone tethering with Ubuntu

June 12, 2010 7 comments

Today was my first time I used iPhone tethering. Tethering means connecting computer to the internet using iPhone’s cellular connectivity (3G/EDGE). The iPhone connects to the computer via USB cable or Bluetooth and uses as a cellular modem. It’s useful when you’re away with a laptop and no wireless hot spots around.

There are many tutorials out there, however I found most of them misleading (advising to use third party software or jailbreak your iPhone – both unnecessary) and none of them for Linux. This tutorial is really easy and simple.

Step 1 – Enable internet sharing on your iPhone
On your iPhone goto Settings -> General -> Network -> Internet sharing -> On. If “Internet sharing” isn’t shown, open Safari and browse to: http://help.benm.at. On this webpage click on “Tethering”, then select your country and your mobile carrier. Accept the profile and reboot your iPhone. After the reboot “Internet sharing” option is supposed to be shown. In my case, my carrier wasn’t on the list so I generated a custom file (the last option). The APN/User/Password were easily found using Google. However, “Internet sharing” stayed hidden. The funny thing is after I removed the custom profile it magically appeared. My iPhone version is 3.1.2 and it worked. I noticed they have warning for 3.1.3 so watch out if you got it.

Step 2 – Install necessary software on Ubuntu
As always, I provide instructions for Ubuntu. The driver you need is called “ipheth” and it depends on “libimobiledevice”. Now, you can find them both on Lucid’s official repositories. However, only version 0.9.7 of libimobiledevice is there, and while it may be enough for tethering, I recommend using the newer version which can be obtained from Paul McEnery PPA (for Karmic it’s still version 0.9.7):

# sudo add-apt-repository ppa:pmcenery/ppa

Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver keyserver.ubuntu.com –recv 3AE22276BF4F39C8D6117D7F4EA3A911D48B8E25
gpg: requesting key D48B8E25 from hkp server keyserver.ubuntu.com

gpg: key D48B8E25: public key “Launchpad PPA for Paul McEnery” imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

# sudo apt-get update

Now, install the driver (and it’s dependencies, which include  the library):
# sudo apt-get install ipheth-utils

Load the driver into running kernel
# sudo modprobe ipheth

At this point if you enter “dmesg” the last line should show something like “usbcore: registered new interface driver ipheth”

Step 3 – Plug your iPhone using USB cable
As soon as you connect your device a new interface should be plumbed, configured and ready to be used (in case you use network manager). You can get list of your interfaces with “ifconfig -a”. On your iPhone there suppose to be label saying “Internet Tethering”. If you don’t use network manager the “Internet Tethering” is triggered when you make DHCP request on that interface (for example, using “dhclient”).

That’s it. As promised, easy and simple. Thanks to Paul McEnery there are plenty of other cool iPhone related stuff you can install from his PPA (on Lucid).

Enjoy!

Chatting with the dark side

April 12, 2010 1 comment

Sometimes, it happens that I prefer being anonymous on the net. I’m not talking about “big brother” conspiracies and how google knows everything about me. It’s probably true, but I’ve nothing to hide from them. I’m talking about situations where I need to reach darker areas of the net, areas swarming with evil. I don’t usually hangout in that sort of places, but from time to time, I need a piece of information available only there.

Disclaimer: I do not in any way encourage you to do any kind of illegal act. Everything you do is on your own responsibility.

Lately, I found myself seeking for information, following a lead to a very suspicious irc server. Yes, irc. The place where all geek wars occurred in mid-nineties. Where we had our chats and channel takeovers, where we got banned and k-lined, where we spoke to bots to fulfill our download needs and had well-defined power hierarchy. Good times indeed. For my non-geek readers, irc stands for Internet Relay Chat. It’s basically a chatting platform, that was quite common back days, way before ICQ.

It turns out that this protocol is still in use, and I needed to get Linux client. The first tool I checked was Empathy, Gnome’s instant messaging client which I already use. It supports irc, but lacks anonymity. Anonymity would masquerade my IP, so the creeps wouldn’t be able to attack me, plus, no one would be able to relate me to that evil server. Quite useful uh?

The best anonymity platform (AFAIK) is Tor (The Onion Router). I won’t get into details, what is it good and bad for, but it basically creates virtual tunnel between you and your destination through different computers, keeping your IP hidden from destination. You still need to make sure you don’t send destination info about your identity. On irc it’s easy. You just leave “real name” empty and use different nick from what you use to.

The irc client I chose was recommended on Tor’s website, XChat. It’s easy to install from Ubuntu repositories and its graphic UI has amazing resemblance to mIRC so I felt home. Tor installation is quite easy as well, you just have to follow the instructions here. Once it’s installed and ready (make sure you got “Bootstrapped 100%: Done.” on /var/log/tor/log) you can start using it. Configure XChat to use it, as described here and you’re done!

Happy chatting.

Virtualizing Mac OS X on Linux

April 5, 2010 4 comments

In my last post I wrote about virtualization. Here I’m going to introduce the world of virtualizing Mac OS X (Apple’s operating system) on linux.

Why would anyone want to run Mac OS X on virtual machine? Many reasons. Some people buy Apple’s computer but prefer linux as an operating system. However they still use from time to time native OS X applications such as iTunes. It makes perfect sense to load virtual OS X instance only when needed. Another reason might be testing new releases of OS X, software updates, etc… but the main reason, I believe, is software developers who want to develop iphone/ipad applications but don’t own Apple computer.

Before I proceed, I have to say a few things about Apple’s behavior and some legal issues as well. Imagine, that in order to develop windows application you’d have to buy computer from Microsoft. You would also have to run windows operating system and use Microsoft’s development environment only. In order to test your application outside the development environment, you’d also must register as Microsoft developer (99$ fee). When you finish developing, you’d have to submit your application to Microsoft’s store, and wait for approval. Microsoft, on it’s end doesn’t obligate to approve or disapprove your application in a given period. If your application does get to the Microsoft store, they keep the right to get it off whenever they feel like changing policy, and then no one would be able to get your application anymore.

If it sounds right, stop reading now. You better off to billy’s blog. Read more…