I wanted to create a hotspot with this tutorial : How to setup an Access Point mode Wi-Fi Hotspot?

Part : Whether your wireless card support Access Point mode.

When i tried manually , i think it was good but i'm not sure because 3g data was activated in background :/.

But after tried their script and modify a litlle because it does not work on my linux , i think that i screwed up iptables when i flush them or anything, i don't know really. Now i have a "!" on the wifi on my phone and i can't have internet on this but i'm connected on the hotspot. So i don't know where is the problem , i think it's not very complicated but after 3 hours and try a lot of without success, Really i don't understand what is my problem :/.

I hope that you will can help me. I don't found all iptables , if you have any command that you want i write , i will do that :).

Lenovo-Flex-2-14:~$ sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Thank you for your help and sorry if for the beggin i haven't code or anything to give you in this case :/

PS : Phone : android 5.1 ( not very important i guess ) Computer : Ubuntu 15.10


I will tell you a step by step procedure for setting up a hotspot in ubuntu and sharing your Internet with it (with less headache). First you need to install two packages

sudo apt-get install hostapd bridge-utils

Now edit /etc/hostapd/hostapd.conf with (If not present create it)


Make it live by Editing /etc/default/hostapd, set the line to be:


Now Bridge the network connections. Open /etc/network/interfaces. Assuming that eth0 is the internet source of your system. Change the configuration something like this.(Make sure to remove iface wlan0)

#loopback adapter
auto lo
iface lo inet loopback
#wired adapter
iface eth0 inet dhcp
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0

Make hostapd to be run everytime on boot:

sudo update-rc.d hostapd enable

Now reboot.. You can start or stop hostapd with

sudo service hostapd stop


sudo service hostapd start

Note: Booting may take a little time if one/both of the interface fails (eth0 wlan0). For example, if you are using an external usb wifi card and removed it while booting, Bridging will fail, hence increase in overall booting time.

  • thank you , but even after to follow your tuto, ,on my phone i see the wireless but during the connexion , i get the message : "authentification error" and it can't to connect at this network :/. Any idea ? – kevin caradant Nov 19 '15 at 22:42
  • Oki sorry , it was the password , i forgot to edit so the network bugged ... now work like a charm , think you , it was so easy intead of dhcp etc where this take me 6hours ^ – kevin caradant Nov 19 '15 at 22:48
  • NB : if i could , i would give you +1 but i haven't much reputations :/ . I created a script if that can be usefull for someone : github.com/kevincaradant/script_hotspot_linux.git . Sorry for the repository ( new repo ) , i rewrite more later the read me :) – kevin caradant Nov 20 '15 at 0:05
  • glad that i helped you – Sijin Krishnan Nov 20 '15 at 0:08
  • Mhh just a question , i don't remember if it was like that at the beginning , but Ethernet and Wifi are " Device Not Managed " when i modify with your config on /etc/network/interfaces , so i can't put my vpn on Ethernet :/ , is it possible ? – kevin caradant Nov 20 '15 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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