Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently installed Ubuntu 12.04 and would like to make a virtual router for my Android Device which only connects to infrastructure networks and not adhoc networks anyone who has any tips please help.

share|improve this question
up vote 5 down vote accepted

Run this in a terminal:

sudo apt-get install hostapd

Then, open a text editor program, for example gedit. Copy the following into it.

wpa_pairwise=TKIP CCMP

Don't forget to fill in the name of your network after ssid= as well as the password after wpa_passphrase=.

After all these, save the file as hostapd.conf in your home folder.

Now, in your terminal:

sudo hostapd hostapd.conf

Turn the Wi-Fi connection on in your devices and enjoy the fast network share!

you might also want to add dhcpd to assign address to your Android device. Alternatively you can configure iptables to use NAT

share|improve this answer
My computer access internet through authentication server at a uni, where do I place the username and password? – Lionthinker Nov 20 '12 at 5:50

protected by Community Aug 9 '13 at 4:03

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.