Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 a Vizio tablet (running a modified version of Android 2.3.2) which, for some reason or another, refuses to list Windows ad-hoc WiFi connections on it's WiFi connection screen. It can connect to WiFi networks served from a normal router, but the wireless bit of my home router is broken, so I'd like to share the internet connection through my laptop's WiFi card until the new router arrives.

Is it possible to create an ad-hoc network in Ubuntu that looks like a normal wireless network to my tablet?

share|improve this question
Is your laptop connected to internet via a wired connection ? – Manula Waidyanatha Mar 29 '12 at 6:31
Indeed; the laptop is connected via ethernet. – James Mar 29 '12 at 16:44

I think your laptop is connected to internet via a wired connection. So what you have to do is forward packets from wireless card to Ethernet card (or whatever you have) in the laptop. In order to do that, [wlan0 - wireless card; eth0 - ethernet card]

  1. Create an ad-hoc network and give it an ip address by ifconfig wlan0
  2. Enable ip_forward by echo 1 > /proc/sys/net/ipv4/ip_forward
  3. Enable forwarding in IPTABLES by iptables -A FORWARD --in-interface wlan0 -j ACCEPT
  4. Enable NAT mode to connect to internet by iptables --table nat -A POSTROUTING --out-interface eth0 -j MASQUERADE
  5. Then give your Tablet an ipaddress and set gateway address to your laptops wireless address(
share|improve this answer
I followed instructions 1-4, but there's no way to manually set the tablet's IP address in it's UI as far as I can find, and the wifi connection doesn't appear in the list of networks it sees. – James Mar 30 '12 at 13:12
you need a DHCP server then – franzlorenzon Jan 28 '13 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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