{"id":395,"date":"2009-09-04T22:32:56","date_gmt":"2009-09-04T20:32:56","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=395"},"modified":"2021-10-13T21:49:28","modified_gmt":"2021-10-13T19:49:28","slug":"configure-wpa-on-linux-howto","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html","title":{"rendered":"Configure WPA on Linux Howto"},"content":{"rendered":"<div style=\"float:left; margin-right:15px; margin-top:0px;\">\n<script async=\"\" src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<!-- 200x200, Netexpertise --><br \/>\n<ins class=\"adsbygoogle\" style=\"display:inline-block;width:200px;height:200px\" data-ad-client=\"ca-pub-6495750100906580\" data-ad-slot=\"1946825373\"><\/ins><br \/>\n<script><br \/>\n(adsbygoogle = window.adsbygoogle || []).push({});<br \/>\n<\/script><\/div>\n<p>WPA encryption is not much hassle to set up and is way more secure than WEP if you use a strong pre-shared key.<br \/>\n&nbsp;<br \/>\nFirst off, we&#8217;ve got a wifi interface that can be displayed with iwconfig (from the wireless tools):<\/p>\n<pre>[root@db ~]# iwconfig\nlo        no wireless extensions.\n\neth0      no wireless extensions.\n\nath0      IEEE 802.11g  ESSID:\"\"\n          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated\n          Bit Rate:0 kb\/s   Tx-Power:13 dBm   Sensitivity=1\/1\n          Retry:off   RTS thr:off   Fragment thr:off\n          Encryption key:off\n          Power Management:off\n          Link Quality=0\/70  Signal level=-95 dBm  Noise level=-95 dBm\n          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0\n          Tx excessive retries:0  Invalid misc:0   Missed beacon:0\n<\/pre>\n<p>&nbsp;<br \/>\nIf the interface doesn&#8217;t show up, install <a href=\"http:\/\/hostap.epitest.fi\/wpa_supplicant\/\">drivers<\/a> first, or check the logs to make sure the card has been detected.<br \/>\n&nbsp;<\/p>\n<h3>wpa_supplicant Configuration File<\/h3>\n<p>Install required package wpa_supplicant. This is all you need and it&#8217;s provided with most Linux distributions.<br \/>\nIf not, you can also download the latest source code from <a href=\"http:\/\/hostap.epitest.fi\/wpa_supplicant\/\">http:\/\/hostap.epitest.fi\/wpa_supplicant\/<\/a> and compile it.<br \/>\n&nbsp;<br \/>\nOnce installed, generate your hex passphrase<\/p>\n<pre>WPA_Linux# wpa_passphrase myssid mypassphrase\nnetwork={\n        ssid=\"myssid\"\n        #psk=\"mypassphrase\"\n        psk=c22c1e6febc7875af85d033bbf15f5ca836633bac8eb16693fd58bff66fcb66c\n}\n<\/pre>\n<p>&nbsp;<br \/>\nEdit \/etc\/wpa_supplicant\/wpa_supplicant.conf (Redhat\/Fedora) or create it (Debian\/Ubuntu) adding these settings.<br \/>\nThe line #psk&#8230; commented out can be removed once it works for more security.<br \/>\n&nbsp;<\/p>\n<h3>Associate with Access Point<\/h3>\n<p>Connect manually to check everthing&#8217;s fine:<br \/>\n&nbsp;<\/p>\n<pre>WPA_linux# wpa_supplicant -iath0 -c \/etc\/wpa_supplicant\/wpa_supplicant.conf\nAssociated with 00:00:00:00:00:00\nCTRL-EVENT-DISCONNECTED - Disconnect event - remove keys\nCTRL-EVENT-SCAN-RESULTS\nTrying to associate with 00:a0:c5:ff:84:72 (SSID='myssid' freq=2412 MHz)\nAssociated with 00:a0:c5:ff:84:72\n<\/pre>\n<p>&nbsp;<br \/>\nNote you may have to specify the driver with -D option.<br \/>\n&nbsp;<\/p>\n<h3>Configure startup files<\/h3>\n<p>On Redhat\/Fedora, configure \/etc\/sysconfig\/network-scripts\/ifcfg-ath0 (replace ath0 with your own interface name of course) as you would for any classic interface and \/etc\/sysconfig\/wpa_supplicant according to your settings<\/p>\n<pre>INTERFACES=\"-iath0\"\nDRIVERS=\"-Dmadwifi\"\n<\/pre>\n<p>&nbsp;<br \/>\nThen restart the service:<\/p>\n<pre>\/etc\/init.d\/wpa_supplicant restart<\/pre>\n<p>&nbsp;<br \/>\nOn Debian\/Ubuntu, edit \/etc\/network\/interfaces and add<\/p>\n<pre>auto ath0\n        iface ath0 inet dhcp\n        pre-up wpa_supplicant -iath0 -c\/etc\/wpa_supplicant\/wpa_supplicant.conf -B\n        post-down killall wpa_supplicant\n<\/pre>\n<p>&nbsp;<br \/>\nAnd reenable the wireless interface or reboot<\/p>\n<pre>ifdown ath0\nifup ath0\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WPA encryption is not much hassle to set up and is way more secure than WEP if you use a strong pre-shared key. &nbsp; First off, we&#8217;ve got a wifi interface that can be displayed with iwconfig (from the wireless tools): [root@db ~]# iwconfig lo no wireless extensions. eth0 no wireless extensions. ath0 IEEE 802.11g [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[11,32],"tags":[169,94,386,76,170,97],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Configure WPA on Linux Howto<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Configure WPA on Linux Howto\" \/>\n<meta property=\"og:description\" content=\"WPA encryption is not much hassle to set up and is way more secure than WEP if you use a strong pre-shared key. &nbsp; First off, we&#8217;ve got a wifi interface that can be displayed with iwconfig (from the wireless tools): [root@db ~]# iwconfig lo no wireless extensions. eth0 no wireless extensions. ath0 IEEE 802.11g [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2009-09-04T20:32:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-13T19:49:28+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html\",\"name\":\"Netexpertise - Configure WPA on Linux Howto\",\"isPartOf\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2009-09-04T20:32:56+00:00\",\"dateModified\":\"2021-10-13T19:49:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"breadcrumb\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure WPA on Linux Howto\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Configure WPA on Linux Howto","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Configure WPA on Linux Howto","og_description":"WPA encryption is not much hassle to set up and is way more secure than WEP if you use a strong pre-shared key. &nbsp; First off, we&#8217;ve got a wifi interface that can be displayed with iwconfig (from the wireless tools): [root@db ~]# iwconfig lo no wireless extensions. eth0 no wireless extensions. ath0 IEEE 802.11g [&hellip;]","og_url":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html","og_site_name":"Netexpertise","article_published_time":"2009-09-04T20:32:56+00:00","article_modified_time":"2021-10-13T19:49:28+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html","url":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html","name":"Netexpertise - Configure WPA on Linux Howto","isPartOf":{"@id":"https:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2009-09-04T20:32:56+00:00","dateModified":"2021-10-13T19:49:28+00:00","author":{"@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"breadcrumb":{"@id":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/configure-wpa-on-linux-howto.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Configure WPA on Linux Howto"}]},{"@type":"WebSite","@id":"https:\/\/www.netexpertise.eu\/en\/#website","url":"https:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/395"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}