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 uses the highest of their performances. 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. Lorenzo 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" with a handheld where you connect via wifi to pc and pc you routes on the Ethernet network. An access point stark!

  3. Lorenzo November 26, 2008 3:45 pm

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

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

  4. Lorenzo November 26, 2008 3:47 pm

    Also, could you tell me how fast PCs communicate on 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 delve into the net there are tons of info.
    eeepc with an iphone and have been connected for 20 yards ... without anything in between, an open space.

  6. Lorenzo November 26, 2008 4:31 pm

    Thanks for the info!

  7. paul November 26, 2008 7:41 pm

    but how do you specify that the key is wpa (or wep or whatever)? thanks

  8. admin November 28, 2008 5:36 pm

    For how does the script for the wep key is ...
    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 say
    wlanconfig: ioctl: No such device
    wlanconfig: ioctl: No such device
    Error for wireless request "Set ESSID" (8B1A):
    September failed on device ath0; 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

    What should I give you the 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 installarti the dhcp server and configure it!
    My script is simply an aid "flying" in cases Cusi need a wifi connection :)
    To what do you want, 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

    > What I should give you the 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