Set up Ubuntu 12.04 Laptop as WiFi Hotspot (ad-hoc) to Share Wired Internet

I made a tutorial showing “How to Make an Ubuntu Laptop as a WiFi Hotspot” before. The post is actually for Ubuntu 10.04. Since the Ubuntu 12.04 LTS (Precise Pangolin) is released, there is a bit problem to implement the same purpose following the setup from that tutorial.

In this post I will show how to setup Ubuntu 12.04 as hotspot (ad-hoc, Access Point) to share wired internet with other WIFI enabled devices, e.g. laptops, iPad, iPhone, iTouch, smart-phones. Do not worry, it is quite easy to do the setup step by step by my captured screenshot.

First of all, what you need are:

A laptop with WIFI hardware and the WIFI function is on
The laptop is connected with internet via wired connection(WLAN)

OK, here we go.

  • 1. Right click network manager on the laptop with wireless hardware (these days most of laptops have wireless modules) and connected with internet by wired network (WLAN), then choose “Edit Connections…”, click it (Figure 1).

Set up Ubuntu Laptop as WiFi Hotspot
Figure 1
Set up Ubuntu Laptop as WiFi Hotspot
Figure 2

  • 2. Click the menu “Wireless”, and click “Add” button, then fill up the blanks as you like: your “Connection name”, “SSID”, then choose “Mode” option as “Ad-hoc”, for others no need to change, shown as Figure 3.

Set up Ubuntu Laptop as WiFi Hotspot
Figure 3

  • 3. The next step is set up your key for the connection, click “Wireless Security”, choose “WEP 40/128-bit Key (Hex or ASCII)”, type your own “Key” if you do not want to make the whole world to share your WIFI, it is better make the length of the key as 5 characters that I tried successfully (other length may not work) (Figure 4).

Set up Ubuntu Laptop as WiFi Hotspot
Figure 4

  • 4. Turn to “IPv4-Settings”, choose the option “Shared to other computers” for “Method”, as shown in Figure 5.

Set up Ubuntu Laptop as WiFi Hotspot
Figure 5

  • 5. Do not make any change for “IPv6 Settings”, OK, click “Save” to finish the setup work, as shown in Figure 6.

Set up Ubuntu Laptop as WiFi Hotspot
Figure 6

  • 6. Left click the wireless icon on the right top corner and left click the last option: “Create New Wireless Network…”, as shown in Figure 7.

Set up Ubuntu Laptop as WiFi Hotspot
Figure 7

  • 7. On the new pop-up window, choose your created wireless network, in my case is “WIFI hotspot via LAN”, and click “Create” button, type your password set at the step 3. (Figure 8).

Set up Ubuntu Laptop as WiFi Hotspot
Figure 8

  • 8. Now, you should see the “Wireless Networks” with a computer icon on your laptop, which means this WIFI is the wireless connection by a computer rather than a wireless router (Figure 9).

Set up Ubuntu Laptop as WiFi Hotspot
Figure 9

  • 9. OK, all work is done on the laptop that acts as WIFI hotspot (ad-hoc). Now you can use the wireless connection (WIFI) you already created for other devices enabled with WIFI connection (Figure 10), select it, and input the Key (password you set) (Figure 11).

Set up Ubuntu Laptop as WiFi Hotspot
Figure 10
Set up Ubuntu Laptop as WiFi Hotspot
Figure 11

  • 10. OK, you are using the WiFi from the laptop connected with cable Internet (WLAN connection) (Figure 12)!

Set up Ubuntu Laptop as WiFi Hotspot
Figure 12
Is it great? Yes, it is, no command, all is done by GUI setup. It is the power of Linux (here is Ubuntu 12.04), since this is only possible on Windows 7 in Microsoft family, almost no way for XP.

The above method has been successfully tested on my two laptops, iPad 2 (WIFI only), and Nokia 5800.

Here is the information of my two laptops (hardware and software).

  • HP 520 laptop, Ubuntu 12.04, cable Internet (WLan)
  • Intel Corporation 82562ET/EZ/GT/GZ – PRO/100 VE (LOM) Ethernet Controller Mobile (rev 01)
  • Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
  • Acer Aspire one Netbook, Ubuntu 12.04, WiFi provided by HP 520
  • Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
  • Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)

Update: If you think the procedure above is too complicated, you can also try the simplest and easiest method: How to create a WiFi hotspot in Ubuntu laptop for mobile devices [easiest and simplest]

Suggested Posts

84 thoughts on “Set up Ubuntu 12.04 Laptop as WiFi Hotspot (ad-hoc) to Share Wired Internet

      1. Sebi

        I know its a bit late now bui by using a static IP, and manually configuring the gateway and DNS you can easily connect your Android phone.

        Reply
          1. Sebi

            FIrst of all, android by default doesn’t support an ad-hoc network I use a rooted Galaxy S2 with edited build.prop files, and there are also other custom ROM’s that enable ad-hoc support,

            For those who don’t have root you will have to do a lil more work to connect, first of all your computer’s wifi must support infrastructure mode(most devices now do) and then it is an execution of series of commands but somebody made up a script called AP-Hotspot which if anybody searches will get instructions to install and configure, or alternatively there is Wiconnect which offers a GUI, which will enable setting up a hotspot and for some people there will be an issue of the android device getting stuck at “Obtaining IP address”, in that case setting a static IP through the advanced wifi settings will help you connect it immediately, for example after setting up the hotspot, find your computes default gateway address which will be something like “192.168.127.1″ (Note:this is an example it could be different for you) or finding your computers IP something like “192.168.127.4″ and then replacing the 4 with 1 will also usually work, this address ie. “192.168.127.1″ should be the gateway address typed in your android device for static IP you can give any number at the end like “192.168.127.8″, just make sure no other device uses the same IP, netmask should be the usual “255.255.255.0 and both the DNS server’s should be Google DNS ie, “8.8.8.8 and 8.8.4.4″ and thats it, works everytime.

  1. Anna

    Thank you for this! This advice is the only thing that has worked to get my iphone4 to connect to my ad hoc wireless laptop connection.

    The key point was that the password must be five characters long. How bizarre!

    Reply
  2. RonC

    Your directions say:
    “First of all, what you need are:

    The laptop is connected with internet via wired connection (WLAN)”

    My laptop (actually, my netbook) works also with a 3G USB modem, and since my Android/Linux phone lacks 3G capability — I would like to feed this signal to my phone.

    This way I could have Internet connectivity, when the phone is being used without a nearby Wi-Fi connection.

    Question: please tell me, is your method strictly limited to use with a wired connection? Or, if there some modification to do the same, but by getting the Internet connection from an USB 3G modem, instead?

    Reply
    1. 土木坛子 Post author

      @RonC: Have you tried my tutorial yet? I do not have USB modem, so I personally do not know it. Feedback on this post does not show any solution either.

      Reply
  3. RonC

    So sorry, I did not see the section ‘Older Comments’ before posting. Back in May another user wanted to do this and you said as far as you know it is not possible.

    I was only able to read the English-language comments so is it possible the other exchanges contain what I need?

    I am hoping since May, there could be be new information? But if not, I shall continue my search.

    Reply
    1. 土木坛子 Post author

      @RonC: So far, I have not heard guys succeed to use USB modem to build an ad-hoc hotspot. You can do a google search, and I would like to know how you fix the problem. Good luck.

      Reply
  4. lorenzobo

    Hi. Thanks for your tutorial.
    My hotspot works with my ipad but only if I don’t set any password. If I use the 5 characters one, the ipad asks for a username and the password but cannot connect (I used no username and the username on the pc but nothing …).

    Thanks!

    Reply
    1. 土木坛子 Post author

      @Tomi: Thanks for your information. The post here was just my successful experience. Considering the complex of the mobile devices, I think it really depends on your fortune.

      Reply
  5. george

    all are fine but net…but a msg comes “hotspot is not connected to internet…Do you want to join anyway???”
    but i’m sure i was conneted to internet

    Reply
  6. Cris

    I followed the instructions to the dot, I also got the message “hotspot is not connected to internet…Do you want to join anyway???” but I just connected to the ad hoc hotspot anyway. Then voila! I can now browse the internet thru my iPad. Thanks.

    Reply
  7. Jatinder singh

    hello Sir,
    Still i have a problem in connecting my Android Phone Samasung Galaxy S DUOS with my wireless connection.
    m using UBUNTU 12.04 version, i followed all the steps given in above tutorial but still facing to fix it.
    m using a wierd network…
    pleasse help me out
    thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>