Results 1 to 7 of 7

Thread: How to install Hostapd v2.3 devel + Disable bss neighbor check/force 40 MHz channels

  1. #1
    Join Date
    2014-Jun
    Location
    Greece
    Posts
    133

    How to install Hostapd v2.3 devel + Disable bss neighbor check/force 40 MHz channels

    The following procedure is a part of
    Aerial - How to E-Z Setup a Multi-mode wireless LAN Based on a Software Access point

    Let's install the dependencies:
    Code:
    apt-get install -y linux-headers-"`uname -r`" build-essential
    apt-get install -y libnl-3-dev libssl-dev libssl1.0.0
    Create lbnl-3 symbolic links:

    For Kali Linux i386 (x32):
    Code:
    ln -s /usr/include/libnl3/netlink/ /usr/include/
    ln -s /lib/"`dpkg --print-architecture`"-linux-gnu/libnl-3.so.200.5.2 /lib/"`dpkg --print-architecture`"-linux-gnu/libnl.so
    ln -s /lib/"`dpkg --print-architecture`"-linux-gnu/libnl-genl-3.so.200.5.2 /lib/"`dpkg --print-architecture`"-linux-gnu/libnl-genl.so
    ln -s /lib/"`dpkg --print-architecture`"-linux-gnu/libnl-genl-3.so.200.5.2 /lib/"`dpkg --print-architecture`"-linux-gnu/libnl-genl-3.so
    For Kali Linux amd64 (x64):
    Code:
    ln -s /usr/include/libnl3/netlink/ /usr/include/
    ln -s /lib/"`uname -m`"-linux-gnu/libnl-3.so.200.5.2 /lib/"`uname -m`"-linux-gnu/libnl.so
    ln -s /lib/"`uname -m`"-linux-gnu/libnl-genl-3.so.200.5.2 /lib/"`uname -m`"-linux-gnu/libnl-genl.so
    ln -s /lib/"`uname -m`"-linux-gnu/libnl-genl-3.so.200.5.2 /lib/"`uname -m`"-linux-gnu/libnl-genl-3.so
    Download latest hostapd:
    Code:
    export HOME_DIR="/root"
    cd $HOME_DIR
    git clone git://w1.fi/srv/git/hostap.git
    Let's configure hostapd's configuration file:
    # Set to yes: CONFIG_DRIVER_HOSTAP, CONFIG_DRIVER_NL80211, CONFIG_LIBNL32, CONFIG_IEEE80211N, CONFIG_IEEE80211AC, CONFIG_ACS
    # Use openssl libraries
    # Enable: WPS and UPnP support for external WPS Registrars
    Code:
    sed 's%#CONFIG_DRIVER_HOSTAP=y%CONFIG_DRIVER_HOSTAP=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_DRIVER_NL80211=y%CONFIG_DRIVER_NL80211=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_LIBNL32=y%CONFIG_LIBNL32=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_IEEE80211N=y%CONFIG_IEEE80211N=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_IEEE80211AC=y%CONFIG_IEEE80211AC=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_ACS=y%CONFIG_ACS=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_TLS=openssl%CONFIG_TLS=openssl%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_WPS=y%CONFIG_WPS=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    sed 's%#CONFIG_WPS_UPNP=y%CONFIG_WPS_UPNP=y%g' $HOME_DIR/hostap/hostapd/defconfig > $HOME_DIR/hostap/hostapd/defconfig1 && mv $HOME_DIR/hostap/hostapd/defconfig1 $HOME_DIR/hostap/hostapd/defconfig
    Enable configuration file:
    Code:
    cp $HOME_DIR/hostap/hostapd/defconfig $HOME_DIR/hostap/hostapd/.config
    Let's patch hostapd to Disable bss neighbor check and force 40 MHz channels width.
    For detailed description about this patch please read this paragraph (1):
    Aerial - How to E-Z Setup a Multi-mode wireless LAN Based on a Software Access point - Part 2
    Open /root/hostap/src/ap/hw_features.c
    Code:
    nano /root/hostap/src/ap/hw_features.c
    goto line 542 and change this:

    iface->conf->channel,
    iface->conf->channel +
    iface->conf->secondary_channel * 4);
    iface->conf->secondary_channel = 0;
    if (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX) {
    /*
    * TODO: Could consider scheduling another scan to check
    to this:
    iface->conf->channel,
    iface->conf->channel +
    iface->conf->secondary_channel * 4);
    /* iface->conf->secondary_channel = 0; */
    if (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX) {
    /*
    * TODO: Could consider scheduling another scan to check
    Let's compile and install:
    Code:
    make clean
    make
    make install
    That's it! You're done. You have Hostapd v.2.3 devel compiled with nl80211 driver, IEEE80211N enabled, IEEE80211AC enabled, ACS enabled and WPS and UPnP enabled.

    Please have in mind that if you want to use a wireless interface with hostapd you must first exclude that interface from controlling by network manager. To do e.g. wireless interface wlan0
    Add a line to /etc/network/interfaces file
    Code:
    iface wlan0 inet manual
    and stop and start networking and network manager
    Code:
    service network-manager stop
    service networking stop
    service networking start
    service network-manager start
    To undo that remove that line and redo the stop/start commands.

    Enjoy!

    Nick_the_Greek
    Security always begins with personal responsibility. - quietman7

  2. #2
    thank you for the post I managed to do it .

    now I have it setup with dhcp server .

    the hotsapd.conf is a lot different than the old one.
    too bad I have to disable the interface and restart net services whenever i use it to connect, unlike the old version that exist in repos

  3. #3
    Join Date
    2014-Jun
    Location
    Greece
    Posts
    133
    Quote Originally Posted by bahha View Post
    thank you for the post I managed to do it .

    now I have it setup with dhcp server .

    the hotsapd.conf is a lot different than the old one.
    too bad I have to disable the interface and restart net services whenever i use it to connect, unlike the old version that exist in repos
    Yes, it's a little bit annoying that start-stop thing but the 2.3 devel hostapd it's alot more stable, fast and we have allot more futures to 'play' with. (WPS, upnp, ieee80211ac etc) and you have to read very carefully the original hotsapd.conf file. Thank God it's very well documented.
    Security always begins with personal responsibility. - quietman7

  4. #4
    Yes It has a lot of features compared to the old one . I have read the conf file it's well explained .
    the version i pulled is 2.4 not 2.3 I don't know yet if those patches were necessary, but it's working anyway .

  5. #5
    Yes It has a lot of features compared to the old one

  6. #6
    Join Date
    2016-Apr
    Posts
    2
    I am really newbie. Found and installed kali 1.0.7 32bit, just to be sure that everything will be working.

    Everything is fine until this step:
    Let's compile and install:
    Code:

    make clean
    make
    make install

    After make clean nothing is happening. Changing directory, but i cant make install. Searching for solution half a day, but i need more details how to install. I will very appreciate.
    Thx

  7. #7
    Join Date
    2016-Apr
    Posts
    2
    here is my solution. before make clean change directory.

    cd /root/hostap/hostapd/

    make clean
    make
    make install


    I am using old chrunchbang linux. Some files are missing, but cli will tell you.

Similar Threads

  1. Replies: 0
    Last Post: 2020-03-15, 21:17
  2. Replies: 0
    Last Post: 2020-03-11, 04:10
  3. Replies: 1
    Last Post: 2015-10-29, 22:27
  4. CDROM Check Fails, Can't do install from Live
    By Bob343 in forum Installing Archive
    Replies: 2
    Last Post: 2014-09-06, 21:00

Posting Permissions

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