Yes, it is possible. I have Ubuntu 11.04, NetworkManager 0.8.4, Android Nexus One phone running Cyanogenmod 7.
As described by Roman, right-click on the NetworkManager icon and choose "Create new wireless network". I chose to leave the connection wide open (no WPA, no WEP). My phone was able to see the network right away and I connected without trouble. The bridging was automatically done so I could browse the internet without configuring anything extra.
The reason why you having trouble with the above method is because stock Android 2.3 doesn't support ad-hoc networks. To be precise, Android's wpa_supplicant does not show ad-hoc networks. There are a number of ways to fix this. Google around and go hunting in the xda-developers forums. You will probably need to do some hacking on your phone that is beyond the scope of this answer.
My personal recommendation: if your phone supports Cyanogenmod, you can install it to get ad-hoc support and other hackish delights. You will need to root your phone, which may or may not be to your taste.
Another alternative is to try "Infrastructure mode". After setting up the ad-hoc wireless network as per above, click on the NetworkManager icon, choose "Edit connections". Hit the wireless tab and Edit the ad-hoc network you just created. Under Mode, choose "Infrastructure". I am unsure if this will work for you since I don't have a stock Android phone to test with. My thought is if ad-hoc mode is the problem, then the another mode might be the solution.
Good luck!
First of all, your phone needs to support Bluetooth tethering. Where to find this setting depends on your phone. If you happen to use Cyanogenmod, it would be under Settings > Wireless & Networks > More > Tethering & portable hotspot > Bluetooth tethering. On other Android flavors you would need to look around. If you don't have this setting, you might be able to get it to work by installing an app – Google Play has a few that claim to do the job, though I haven't tried any myself.
Having made sure your phone supports Bluetooth tethering, get Blueman (from the Ubuntu repositories). With that you can pair your phone and computer and then use it for Internet connection.
Best Answer
Well, it can be done with rooted 2.2+ devices. It's not simple.
Before I start, you might just find it easier to buy a cheap USB Wifi dongle and share the connection to your phone through that. It's a much more simple procedure and doesn't require root on the phone.
But here's how to do it over USB:
Put your phone in USB debugging mode (in settings → applications → usb). Plug the phone in.
Then you need to turn on USB tethering on the phone. On my SGS2, this sits in Settings → Wireless and network → Tethering and portable hotspots.
At this point, a new network device will be added to the computer (
usb0
).Fire off the following commands to bridge eth0 and your new USB connection.
Then load a terminal on your phone (or use the SDK adb shell) and fire off (as root):
To reverse it all:
To make things slightly easier there are a few Apps out there that do the phone side of things (ASProxy for example) but you still need a rooted 2.2 device. The computer side of things can be scripted. You could even hook into udev to fire these commands off when you plug the phone in (and destroy the bridge when you unplug it).