Results 1 to 12 of 12

Thread: Create Hotsopt on Kali linux

  1. Lightbulb Create Hotspot on Kali linux

    Hotspot share your computer's Internet connection with other devices over Wi-Fi.

    Find wireless driver and make sure that driver is ath5k or ath9k, this solution will only work for those drivers.
    For others wireless cards and drivers for now doesn't work...

    1. In terminal type: lspci
    If you use usb wireless adapter type command lsusb.

    We now need to install 2 additional tools to make out hotspot, 1st one is hostapd(hotspot server), 2nd one is dnsmasq(dns dhcp server).

    2. apt-get install hostapd dnsmasq

    3. Stop those services if started already, and prevent them from starting on system start up.

    in terminal type:
    sudo service hostapd stop
    sudo service dnsmasq stop
    sudo update-rc.d hostapd disable
    sudo update-rc.d dnsmasq disable

    4. Now we need to set up config files.
    in terminal type: gedit /etc/dnsmasq.conf
    or kate /etc/dnsmasq.conf if you use kde...

    add those lines to the config file:

    __Code:___________________________________________ ____________

    # Bind to only one interface
    bind-interfaces
    # Choose interface for binding
    interface=wlan0
    # Specify range of IP addresses for DHCP leasses
    dhcp-range=192.168.150.2,192.168.150.10

    __________________________________________________ __________

    5. hostapd config
    In terminal type: gedit /etc/hostapd.conf

    and add those lines:
    _____Code:________________________________________ _______________

    # Define interface
    interface=wlan0
    # Select driver
    driver=nl80211
    # Set access point name
    ssid=myhotspot
    # Set access point harware mode to 802.11g
    hw_mode=g
    # Set WIFI channel (can be easily changed)
    channel=6
    # Enable WPA2 only (1 for WPA, 2 for WPA2, 3 for WPA + WPA2)
    wpa=2
    wpa_passphrase=mypassword
    __________________________________________________ _______
    You can change ssid name and password for anything you want here. Current config will create hotspot named myhotspot with password mypassword.

    6. Now create anywhere you want a file named it hotspot.sh (best way to save script on Desktop)
    Edit it with any text editor like this:


    ________ Code: ___________________________________________
    #!/bin/bash
    # Start
    # Configure IP address for WLAN
    sudo ifconfig wlan0 192.168.150.1
    # Start DHCP/DNS server
    sudo service dnsmasq restart
    # Enable routing
    sudo sysctl net.ipv4.ip_forward=1
    # Enable NAT
    sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    # Run access point daemon
    sudo hostapd /etc/hostapd.conf
    # Stop
    # Disable NAT
    sudo iptables -D POSTROUTING -t nat -o ppp0 -j MASQUERADE
    # Disable routing
    sudo sysctl net.ipv4.ip_forward=0
    # Disable DHCP/DNS server
    sudo service dnsmasq stop
    sudo service hostapd stop
    __________________________________________________ ____________

    You will probably need to change ppp0 in this to eth0 or any other number which refers to your wired connection.

    7. Last step. Now you can start your hotspot by starting script. Just run it...
    For me it looks like this:
    root@kali:~# cd /root/Desktop/
    root@kali:~/Desktop# ./hotspot.sh
    Because I have it on my Desktop.

    Enoy in your new Hotspot!!!!!!


    By MasterButcher
    Last edited by MasterButcher; 2013-06-11 at 18:59.

  2. #2
    Join Date
    2013-Jun
    Posts
    1
    with AWUS036NH I get an error when trying to connect devices : wlan1: STA 18:46:17:65:3c:84 IEEE 802.11: did not acknowledge authentication response
    wlan1: STA 18:46:17:65:3c:84 IEEE 802.11: disassociated

  3. #3
    Join Date
    2013-Jun
    Posts
    1
    Quote Originally Posted by chine View Post
    with AWUS036NH I get an error when trying to connect devices : wlan1: STA 18:46:17:65:3c:84 IEEE 802.11: did not acknowledge authentication response
    wlan1: STA 18:46:17:65:3c:84 IEEE 802.11: disassociated
    Ich have the same Problem...

  4. Sorry guys...

    I wrote tutorial for Atheros wireless cards.
    Try to install the driver for alfa AWUS036NH.
    Here is the link with wireless drivers for linux...
    http://wireless.kernel.org/en/users/Drivers
    http://wiki.debian.org/WiFi
    I have on my notebook atheros card and Airlive usb wireless card(contain RTL 8187 driver).
    Atheros wireless card from my notebook works fine without errors,but my Airlive usb wireless card doesn't work....
    If i found solution for hotspot to work with others wireless cards I will post new tutorial...

    If you have problems with installing dnsmasq (broken package)
    run root@kali: apt-get update && apt-get install -y linux-headers-$(uname -r)
    now install dnsmasq again and it will be install without errors.

    Here is my pictures:
    1.my atheros wireless card:
    http://postimg.org/image/sjzh4v1jr/
    2.my hotspot:
    http://postimg.org/image/muibbut87/
    Last edited by MasterButcher; 2013-06-11 at 19:02.

  5. #5
    Join Date
    2013-Jul
    Posts
    2
    Tried it. Worked perfectly but havent connected to the hotspot with anoteher device. Thanks

  6. #6
    Join Date
    2013-Aug
    Posts
    5
    Has anyone had any success creating a hotspot with alfa AWUS036NH or alfa AWUS036H? I want to create a hotspot with 2 wireless cards.

    I use the rtl8187 driver for one and iwlwifi for the other.

    I get the following output when trying this hotspot method:
    Code:
    # bash hotspot.sh 
    [ ok ] Restarting DNS forwarder and DHCP server: dnsmasq.
    net.ipv4.ip_forward = 1
    Configuration file: /etc/hostapd.conf
    Line 4: invalid/unknown driver 'rtl8187'
    1 errors found in configuration file '/etc/hostapd.conf'
    net.ipv4.ip_forward = 0
    [ ok ] Stopping DNS forwarder and DHCP server: dnsmasq.

  7. #7
    Join Date
    2013-Dec
    Posts
    1
    Hi there guys,

    What about having a hotspot running on two interfaces? The AWUS connected to the desired network, and then for example my built in Atheros broadcasting the network that Alfa is connected to? Would this work?

  8. #8
    Join Date
    2014-Jan
    Posts
    5
    I tried what unclePancho said but i cant get internet the windows pc connect's on my kali pc but i have no internet connection and i did edit the hotspot.sh from ppp0 to wlan1 that is the interface that is connected to the internet but no luck any help???



    I finally got it work just edit the hotspot.sh and used for first time my eth0 and later switched to wlan1(my interface that is connected to the internet) and it worked vry good.
    Last edited by heman; 2014-03-13 at 00:59. Reason: answer to question

  9. #9
    Join Date
    2013-Jul
    Posts
    844
    An easy and quick way to set up a hotspot would be to use pwnstar9.0. It works with the AWUSO36H and probably any device that supports monitor mode and we have connect to it and thru it using many devices to include mobile phones. Technically it is a phishing program but it works fine as a hotspot as well.

    MTC

  10. #10
    Join Date
    2013-May
    Posts
    21
    It's great, thank You!
    work perfect with r8169 driver (but must leave nl80211 in conf file)

  11. #11
    Join Date
    2015-Jul
    Posts
    5

    Question

    Can someone guide me a bit? I use the USB card Alfa awus036nh and created an access point with it, and when I am trying to connect to the hostapd hotspot from another device I get this log in access point log:
    Code:
    wlan0: STA a0:0b:XX:XX:XX:XX IEEE 802.11: did not acknowledge authentication response
    Can these drivers help ? https://wireless.wiki.kernel.org/en/users/Drivers
    If so, how to use these driver(s) and which one to get from there? That page confuses me, not sure where to download, I am not sure if those are individual drivers or if there are a few drivers and underneath are just supported devices for it.

    These are the card details I see in airmon-ng:
    Code:
    wlan0           Ralink RT2870/3070      rt2800usb - [phy0]
    Edit: I remember this connection error was because I had to start some programs manually, I think dnsmask had to be stopped so hostapd starts it by itself or something like that.
    Last edited by adrianTNT; 2015-08-14 at 17:55.

  12. #12
    Join Date
    2015-Aug
    Posts
    3

    RE: Fatty

    Quote Originally Posted by Fatty View Post
    Has anyone had any success creating a hotspot with alfa AWUS036NH or alfa AWUS036H? I want to create a hotspot with 2 wireless cards.

    I use the rtl8187 driver for one and iwlwifi for the other.

    I get the following output when trying this hotspot method:
    Code:
    # bash hotspot.sh 
    [ ok ] Restarting DNS forwarder and DHCP server: dnsmasq.
    net.ipv4.ip_forward = 1
    Configuration file: /etc/hostapd.conf
    Line 4: invalid/unknown driver 'rtl8187'
    1 errors found in configuration file '/etc/hostapd.conf'
    net.ipv4.ip_forward = 0
    [ ok ] Stopping DNS forwarder and DHCP server: dnsmasq.
    To fix this issue, you need to create the hostapd.conf in the folder /etc/ when using kali linux. Because if you install hostapd through terminal using apt-get install, it will create a sub-folder called hostapd which you will have to cd into. Otherwise, just create the config file in just /etc/ and save it as hostapd.conf. This should fix your issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •