1

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?

2
  • Is your laptop connected to internet via a wired connection ? Mar 29, 2012 at 6:31
  • Indeed; the laptop is connected via ethernet.
    – James
    Mar 29, 2012 at 16:44

1 Answer 1

3

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 10.0.0.1
  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(10.0.0.1).
2
  • 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, 2012 at 13:12
  • 1
    you need a DHCP server then Jan 28, 2013 at 10:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .