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 Huwaei modem (E1820 to be precise) that i use for my internet whims and fancies. But what I want to do is set up an adhoc wireless network so another device can connect to my network and in turn I want that device to be able connect to the internet through the network. I've managed to set it up relatively effortlessly on Win7 so the it is possible on my hardware. But now I need to do it here.

Basically what i've done is the following.

  1. Connect to a "Automatic (PPP)" Mobile Broadband
  2. Set up a wireless network

    1. Set the SSID to a unique name
    2. Set the Mode to "Ad-hoc"
    3. Set the IPv4 Method to "Manual"
    4. Set the IP Address (, Netmask, Gateway ( to the same as what I would on win7
    5. Tried leaving the DNS server blank, tried filling it with the same DNS server the mobile card uses and tried setting it to

tested... didn't work... read some tutorials

  1. Installed Firestarter

    1. Set the Internet Connected Network device to ppp0
    2. Local network connected device to wlan0
    3. Enable internet connection sharing

at this point i cant even connect to the internet on this computer unless i disable the wlan

what am i doing wrong?

share|improve this question
Okay I set the wlan to shared with other computers, now i can run the ppp0 and wlan0 together and connect to the net, but my other device throws the error that the wlan is not owned by me. I'm assuming this has something to do with being unable to automatically set an IP that matches the wlan0 – sagetarian Feb 15 '12 at 8:49

Since you're able to use ppp0 and wlan0 both, i'll skip to the main thing. You don't need firestarter. You see to use automatic configuration, you would have to install a DHCP server, which is a fairly painful process, when you take into account all the configuring you need to do. So we'll do this the static way. On your linux machine that is connected to the internet, execute the following commands as root:

iptables -A FORWARD -i ppp0 -o wlan0 -s -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

After you do this, go to your other machines and enter the following the the TCP/IPv4 settings for the ad-hoc wireless connection:

IP address: (except 100)
Subnet Mask:

Primary DNS:
Secondary DNS:

And if everything goes well, you should be able to ping

share|improve this answer

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.