Create an Access Point with a Linux laptop

It can happen that you have a cable connection but no wifi or because he is absent or because security policy for the people outside can not access them. But now it is customary to have a PDA or smartphone that once connected to a wifi network express their full performance. How so?

You can turn a laptop into a linux access point through a simple script:

#Creazione di un access point
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwconfig ath0 essid MIOAP channel 2 key 0123-4567-89
ifconfig ath0 up 192.111.1.1 netmask 255.255.255.0
echo “1″ > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -j MASQUERADE
sleep 10
#FINE

You can of course customize the 'essid, channel and password.
Obviously I did not set a dhcp, then you must configure the handheld ad-hoc, so give it directly to the 'ip, dns etc ... etc ...

Posted under EeePC , Technology

This post was written by admin on November 26, 2008

Tags: , , , ,

Other Posts

Next post:

16 Comments so far

  1. Lawrence November 26, 2008 12:53 pm

    Hi, it works with an EeePC or Acer Aspire One?

    You could create a bridge between the wifi network and the eth?

    Thanks for the info

  2. admin November 26, 2008 1:03 pm

    I run the script sull'eeepc but seeing the features of the Acer, I guess there really are problems, the script is just a sequence of standard commands :-)
    What does this script is just a machine to create a "bridge" where you connect with a PDA to the PC via wifi and ethernet on the PC you routes. An access point stark!

  3. Lawrence November 26, 2008 3:45 pm

    Beautiful! I was just thinking the Dreambox eeePC + + HD + USB Connection via USB with mobile phone

    Sorry if I take this opportunity ... that has brought the wifi network so configured on your eeepc?

  4. Lawrence November 26, 2008 3:47 pm

    Also, could you tell me how fast PCs communicate in a wireless network?

    Thank you!

  5. admin November 26, 2008 3:54 pm

    The wifi network has the maximum theoretical 54Mbit / s, if the connection is great and you are the only online ... If you want to deepen the network there are tons of info.
    eeepc with an iphone and have been connected for 20 yards ... without anything in between, un'open space.

  6. Lawrence November 26, 2008 4:31 pm

    Thanks for the info!

  7. paul November 26, 2008 7:41 pm

    But how do you specify the key and WPA (or WEP or other)? thanks

  8. admin November 28, 2008 5:36 pm

    The way the script is done ... the key is wep
    Honestly, I never bothered to use a wpa, at least not for an AP of luck ...

  9. Matt January 1, 2009 4:35 pm

    Hello I have a probema, I can not start your scrpt, I've probably done something wrong because I said
    wlanconfig: ioctl: No such device
    wlanconfig: ioctl: No such device
    Error for wireless request "Set ESSID" (8B1A):
    Failed on device ath0 September; No such device.
    ath0: ERROR reading interface flags: No device
    SIOCSIFADDR: No device
    ath0: ERROR reading interface flags: No device
    SIOCSIFNETMASK: No device
    could you help me? (I have a eeepc 900 with eeebuntu installed)

  10. admin January 7th, 2009 11:59 am

    I should give what you command iwconfig restiuisce
    'Cause I think you're ussando of different drivers from my ...

  11. Alberto January 15, 2009 9:32 pm

    Hello!
    with the script!
    a question: if I wanted to activate the dhcp so that those who connect to the internet via my PC does not have to set the ip static commands should I add?

    thank you!

  12. admin January 19, 2009 10:35 am

    The operation is not so immediate that you should install the dhcp server and configure it!
    My script is simply an aid "flying" in cases Cusi need a wifi connection :)
    For what you want to do, I suggest a little 'reading on the dhcp server :)

  13. home loan January 30, 2009 1:46 am

    Lovely. Great site.

  14. hacku September 20, 2009 9:30 pm

    oO amazing I found exactly what I was looking for! a script that could run on eeepc with Linux to create an access point in order to connect my phone xD
    I was not clear, however, the settings you said ... so now I try the script and let you know

  15. maaaatteo July 23, 2010 9:31 pm

    > I should give what you command iwconfig restiuisce
    > Why 'I think you're ussando of different drivers from my ...

    that do not have the madwifi, I guess .. : /

  16. skarux October 9, 2010 1:13 pm

    But if I had to return to a normal configuration (eg normally connect to a wifi access point) I do something wrong? Or just restart the network service to return to my default configuration?

Leave a Comment

Name (required)

Email (required)

Website

Comments