Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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).
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
1  
you need a DHCP server then –  franzlorenzon Jan 28 '13 at 10:04

Your Answer

 
discard

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.