[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:network_services:configuring_a_wireless_access_point [2012/11/18 22:19 (UTC)] – [IP_forwarding and routing] populated markushhowtos:network_services:configuring_a_wireless_access_point [2012/12/23 10:50 (UTC)] (current) markush
Line 4: Line 4:
 <note>Work in Progress</note> <note>Work in Progress</note>
  
-This Howto explains how you can share your internet-connection via the wireless NIC of your computer (Wlan Access Point).+This Howto explains how you can use your computer as a Wireless Accesspoint. \\ 
 +This means if the computer has an Internet connection and a wireless interface, other computers can use it'internet connection via wlan. \\ 
 +This is a very limited setup, it can be expanded with DHCP, DNS and a firewall, but this subjects can be found in other Howtos here at SlackDocs.
  
 ===== Requirements ===== ===== Requirements =====
Line 12: Line 14:
 ===== Configuring hostapd ===== ===== Configuring hostapd =====
  
 +The configuration of hostapd is done in the file /etc/hostapd/hostapd.conf, here an example
 +<code>
 +# the wireless interface 
 +interface=wlan0
 +# the driver -- there are other settings possible, but very likely the following works 
 +driver=nl80211
 +logger_syslog=-1
 +logger_syslog_level=2
 +logger_stdout=-1
 +logger_stdout_level=2
 +dump_file=/tmp/hostapd.dump
 +ctrl_interface=/var/run/hostapd
 +ctrl_interface_group=0
 +# The SSID -- i.e. the name of the wireless network (which will be shown when you scan for available networks)
 +ssid=yourwlannamehere
 +country_code=DE
 +# check the manpage for hostapd and your hardware for the mode
 +hw_mode=g
 +channel=7
 +beacon_int=100
 +dtim_period=2
 +max_num_sta=255
 +rts_threshold=2347
 +fragm_threshold=2346
 +macaddr_acl=0
 +auth_algs=3
 +ignore_broadcast_ssid=0
 +eapol_key_index_workaround=0
 +eap_server=0
 +own_ip_addr=127.0.0.1
 +wpa=1
 +# The WPA2 key 
 +wpa_passphrase=your very secret passphrase here
 +# the next settings refer to the settings in the clients wpa_supplicant.conf
 +wpa_key_mgmt=WPA-PSK
 +wpa_pairwise=TKIP 
 +rsn_pairwise=CCMP
 +</code>Be sure to read the manpage for hostapd
 ===== Configuring the client ===== ===== Configuring the client =====
  
 In this Howto I'll only describe a minimal setup with a static IP-configuration.  In this Howto I'll only describe a minimal setup with a static IP-configuration. 
 +<code>ip-adress: 192.168.45.10
 +subnetmask: 255.255.255.0
 +gateway: 192.168.45.1</code>
 +Since we have (in this minimal configuration) no DNS-server running in our network, you'll have to configure your client with the same DNS-server that your Accesspoint is using (look at /etc/resolv.conf).
 ===== IP_forwarding and routing ===== ===== IP_forwarding and routing =====
  
 === Enable IP forwarding === === Enable IP forwarding ===
  
-<code>echo "1" > /proc/sys/net/ipv4/ip_forwarding</code>+<code>echo "1" > /proc/sys/net/ipv4/ip_forward</code>
  
 === Internet Connection Sharing === === Internet Connection Sharing ===
Line 25: Line 69:
 <code>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</code> <code>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</code>
 In this case eth0 is the interface which is connected to the internet. If your computer has a connection via ppp you shouls use ppp0 instead of eth0. In this case eth0 is the interface which is connected to the internet. If your computer has a connection via ppp you shouls use ppp0 instead of eth0.
 +
 +===== Starting the Accesspoint =====
 +
 +<code>ifconfig wlan0 192.168.45.1 up
 +/etc/rc.d/rc.hostapd start</code>
 +The first line starts wlan0 with IP-adress 192.168.45.1, the second line starts the daemon.
  
  
Line 33: Line 83:
 <!-- * Original source: [[http://some.website.org/some/page.html]] --> <!-- * Original source: [[http://some.website.org/some/page.html]] -->
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-<!-- * Originally written by [[wiki:user:xxx User X]] -->+* Originally written by [[wiki:user|Markus Hutmacher]]
 <!-- * Contributions by [[wiki:user:yyy | User Y]] --> <!-- * Contributions by [[wiki:user:yyy | User Y]] -->
 + 
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 <!-- You must remove the tag-word "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
-{{tag>howtos template}}+{{tag>howtos wifi, accesspoint, routing, iptables}}
 howtos:network_services:configuring_a_wireless_access_point ()