FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2009
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to set up a wpa2 wireless connection in F15 using the ifcfg method

    NetworkManager is a powerful tool for setting up a wlan connection, especially if you connect the laptop to multiple access points. One drawback is that the user accounts must be given access to the pass
    phrase. Another is that there is no wlan connection in run level 3, because nm-applet is an X application.

    If you connect to the same access point all the time, e.g., your own wireless router, a permanent connection via ifcfg might be more convenient. It is controlled by root. All user accounts have wireless access without knowing the underlying details. Further, there is a wireless connection in run level 3. After a lot of trial and error and Google searches, I was able to put together this guide by splicing together one step used in Slackware (from Alienbob's web page) with other steps outlined in this online article http://home.roadrunner.com/~computer...hwireless.html.

    It is assumed that the appropriate kernel module for the wlan card is installed and that
    $ iwconfig
    shows a viable wlan0 interface. We are using DHCP. (If using static IP, edit ifcfg-wlan0.)

    The following steps work on a Compaq Presario F756NR notebook with a Atheros AR242x 802.11abg WLAN card using the ath5k kernel module (without madwifi). I am using 64-bit F12. All commands are executed as root.

    1.
    Code:
    $ yum install wpa_supplicant dhclient
    2.
    Code:
    $ cd /etc/sysconfig && vi wpa_supplicant
    Insert the following lines in the above file:
    Code:
    INTERFACES="-iwlan0"
    DRIVERS="-Dwext"
    OTHER_ARGS="-f /var/log/wpa_supplicant.log"
    3.
    Code:
    $ cd /etc/wpa_supplicant && vi wpa_supplicant.conf
    Insert the following lines, where Your_SSID is obvious and Your_PSK will be generated in step 4:
    Code:
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=0
    eapol_version=1
    ap_scan=1
    fast_reauth=1
    network={
    # Set scan_ssid=1 if the access point is hidden.
      scan_ssid=0
      proto=WPA RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP TKIP
      group=CCMP TKIP WEP104 WEP40
      ssid="Your_SSID"
      psk=Your_PSK
    }
    4. No quotation marks in this command:
    Code:
    $ /usr/sbin/wpa_passphrase Your_SSID Your_wpa2passphrase >> wpa_supplicant.conf
    5. There is now a new "network" code block at the end of wpa_supplicant.conf. Copy the new SSID and PSK lines to the "network" block above at the locations shown in step 3. Delete the new "network" code block:
    Code:
    $ vi wpa_supplicant.conf
    6.
    Code:
    $ chmod 600 wpa_supplicant.conf
    7.
    Code:
    $ cd /etc/sysconfig/network-scripts && vi ifcfg-wlan0
    Insert the following lines in the above file:
    Code:
    DEVICE=wlan0
    ONBOOT=no
    TYPE=Wireless
    BOOTPROTO=dhcp
    8.
    Code:
    $ service NetworkManager stop
    $ chkconfig NetworkManager off
    $ service wpa_supplicant start
    $ chkconfig wpa_supplicant on
    $ service network stop
    $ chkconfig network on
    9.
    Code:
    $ cd /etc/rc.d && vi rc.local
    Insert the following lines in the above file:
    Code:
    /bin/sleep 1
    /sbin/dhclient wlan0
    On reboot, the wireless connection should be established.
    Last edited by plasmonics; 25th April 2012 at 12:59 PM.

  2. #2
    Join Date
    Jul 2009
    Location
    London,England
    Posts
    1,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice alternative, but more simply you could just do 'yum install cnetworkmanager' (the command line version) and have it connect from /etc/rc.local

    Code:
    cnetworkmanager -C <ssid> --wpa-pass=<passphrase>

  3. #3
    Join Date
    Sep 2004
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to set up a WPA2 wireless connection in Fedora using the ifcfg method

    Where does it say above it is WPA2 and not plain WPA ?

  4. #4
    Join Date
    Jan 2010
    Posts
    8,696
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: How to set up a WPA2 wireless connection in Fedora using the ifcfg method

    As the thread is about 7 years old, I'm not sure if the original poster is around to answer that.

    I haven't seen a plain WPA access point in a long time.

  5. #5
    Join Date
    Sep 2004
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to set up a WPA2 wireless connection in Fedora using the ifcfg method

    Ah, my mistake. I misread quickly, this thread would be about providing WPA2 WLAN Access-point.

    As far as I know, in Fedora, with NetworkManager and with wpa_supplicant.service one cannot offer AP with WPA2
    With NetworkManager, only available WLAN authentication and encryption standard seems to be WEP for an access point (AP).

    WPA2 AccessPoint in Fedora can be done with hostapd and dnsmasq. NetworkManager has to be forbid not to touch the WLAN-device which is used with hostapd. Also wpa_supplicant.service needs to be disabled.

  6. #6
    Join Date
    Jan 2010
    Posts
    8,696
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: How to set up a WPA2 wireless connection in Fedora using the ifcfg method

    Again, this is a 7 year old howto, so I don't think it really matters anymore.

    If you want to write a howto about using Fedora 22 (or 23?) as a wireless access point, I would just open a new thread in the guides and howtos.

  7. #7
    Join Date
    Sep 2004
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to set up a WPA2 wireless connection in Fedora using the ifcfg method

    Ok. Will do it later. Noticed about the date, 7 years ago, only when you had replied. But same time has to be said, 7 years, it is a shame Fedora still cannot provide anything else but WEP based Access Point through the NetworkManager settings. Even small under us$100 Android devices can do it easily from the settings and after configuration just from swiping down from top of a screen and hitting one icon :P

    Nevertheless, it is good I found this thread, because I have thought about needing to learn how to search and connect to WPA2 networks just from CLI.
    btw, straightly related to this topic, to get list of ESSIDs of visible Access Points:
    # iwlist wlan0 scanning

  8. #8
    Join Date
    Jan 2010
    Posts
    8,696
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: How to set up a WPA2 wireless connection in Fedora using the ifcfg method

    Believe me, many of us have replied to ancient threads.

    Fedora probably still has a WEP option because, even in this day and age, they are still around.

Similar Threads

  1. WPA2 connection help :P
    By lollysticky in forum Using Fedora
    Replies: 2
    Last Post: 23rd March 2009, 01:59 AM
  2. No Go? Fedora 8 & Intel Wireless WiFi Link 4965AGN & WPA2 Personal
    By alphonsebrown in forum Servers & Networking
    Replies: 2
    Last Post: 25th November 2007, 05:34 PM
  3. Possible Wireless Solution (WPA2-Personal & Static IP Address)
    By Underdonk in forum Servers & Networking
    Replies: 2
    Last Post: 16th November 2007, 09:48 PM
  4. Wireless WPA2 Internet
    By EvoX in forum Hardware
    Replies: 1
    Last Post: 5th June 2007, 02:35 PM
  5. Please post your ifcfg-wireless file. I need the original one.
    By JesusDM in forum Servers & Networking
    Replies: 11
    Last Post: 2nd April 2005, 05:29 PM

Tags for this Thread

Posting Permissions

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