License

Copyright (C) 2008-2021 Oliver Bohlen.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

A copy of the license is included in the section entitled "GNU Free Documentation License".

Introduction

This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

Howto: WLAN Access Point for Gentoo Linux

This is a small howto for setting up yout own WLAN-Accesspoint. For this you need a WLAN-Card which can be put into "managed mode".
You have to link net.wlan0 against net.lo fpor getting it into a runlevel

ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0

If you want to use this solution you need the following howto(s) finished:

Required software

The required software has to be installed with the following command(s):
emerge net-wireless/hostapd
emerge net-wireless/iw

Changes in /etc/conf.d/net

File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--

Click here for a download of the complete file: /etc/conf.d/net

Changed on 13.10.15
Issued by olli
Beginning line 17

Configuration of the Interface

modules_wlan0="!iwconfig !wpa_supplicant"
config_wlan0="XXX.XXX.XXX.XXX/16 fd25::200/64"
#config_wlan0="XXX.XXX.XXX.XXX/16"
rc_net_wlan0_provide="!net"
#mtu_wlan0="2304"

Changes in /etc/conf.d/net.bak

File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--

Click here for a download of the complete file: /etc/conf.d/net.bak

Changed on 13.10.15
Issued by olli
Beginning line 21

Configuration of the Interface

modules_wlan0="!iwconfig !wpa_supplicant"
config_wlan0="XXX.XXX.XXX.XXX/16"
rc_net_wlan0_provide="!net"
#mtu_wlan0="2304"

Changes in /etc/hostapd/hostapd.conf

File permissions:
Owner: root
Group: root
Permissions: -rw-------

Click here for a download of the complete file: /etc/hostapd/hostapd.conf

Changed on 13.10.15
Issued by olli
Beginning line 2710

Config for a WLAN Access Point with hostapd

interface=wlan0
driver=nl80211
# g means 2.4GHz
hw_mode=g
# the channel to use, 0 means the AP will search for the channel with the least interferences
channel=3
# limit the frequencies used to those allowed in the country
ieee80211d=1
country_code=DE
# 802.11n support
ieee80211n=1
#ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40]
# 802.11ac support
#ieee80211ac=1
# QOS
wme_enabled=1
# WLAN
ssid=WLAN
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=secret
# MAC Filter
#macaddr_acl=1
#accept_mac_file=/etc/hostapd/hostapd.macaccept
# Logging
logger_syslog=1
logger_syslog_level=1

Changes in /etc/hostapd/hostapd.conf-2.4

File permissions:
Owner: root
Group: root
Permissions: -rw-------

Click here for a download of the complete file: /etc/hostapd/hostapd.conf-2.4

Changed on 13.10.15
Issued by olli
Beginning line 2401

Config for a WLAN Access Point with hostapd

interface=wlan0
driver=nl80211
# g means 2.4GHz
hw_mode=g
# the channel to use, 0 means the AP will search for the channel with the least interferences
channel=1
# limit the frequencies used to those allowed in the country
ieee80211d=1
country_code=DE
# 802.11n support
ieee80211n=1
#ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40]
# 802.11ac support
#ieee80211ac=1
# QOS
wme_enabled=1
# WLAN
ssid=WLAN
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=secret
# MAC Filter
#macaddr_acl=1
#accept_mac_file=/etc/hostapd/hostapd.macaccept
# Logging
logger_syslog=1
logger_syslog_level=1

Changes in /etc/hostapd/hostapd.conf-5

File permissions:
Owner: root
Group: root
Permissions: -rw-------

Click here for a download of the complete file: /etc/hostapd/hostapd.conf-5

Changed on 13.10.15
Issued by olli
Beginning line 2401

Config for a WLAN Access Point with hostapd

interface=wlan0
driver=nl80211
# g means 2.4GHz
hw_mode=a
# the channel to use, 0 means the AP will search for the channel with the least interferences
channel=0
# limit the frequencies used to those allowed in the country
ieee80211d=1
country_code=DE
# 802.11n support
ieee80211n=1
#ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40]
# 802.11ac support
ieee80211ac=1
# QOS
wme_enabled=1
# WLAN
ssid=WLAN
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=secret
# MAC Filter
#macaddr_acl=1
#accept_mac_file=/etc/hostapd/hostapd.macaccept
# Logging
logger_syslog=1
logger_syslog_level=1

Changes in /etc/hostapd/hostapd.macaccept

File permissions:
Owner: root
Group: root
Permissions: -rw-------

Click here for a download of the complete file: /etc/hostapd/hostapd.macaccept

Changed on 13.10.15
Issued by olli
Beginning line 1

List of allowed Client-MACs

# Epson Drucker
XX:XX:XX:XX:XX:XX
# gabosh-droid
XX:XX:XX:XX:XX:XX
# paddy
XX:XX:XX:XX:XX:XX
# luettje
XX:XX:XX:XX:XX:XX
# groot
XX:XX:XX:XX:XX:XX
# small-gabosh
XX:XX:XX:XX:XX:XX
# Eltern Smartphone
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
# Pias Notebook
XX:XX:XX:XX:XX:XX
# user2s Nexus 5
XX:XX:XX:XX:XX:XX
# think-gabosh
XX:XX:XX:XX:XX:XX
# Katrins (Flo) Smartphone
XX:XX:XX:XX:XX:XX
# TEST/BACKUP HTCs
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
# Flos Smartphone
XX:XX:XX:XX:XX:XX
# Ingo iPhone
XX:XX:XX:XX:XX:XX
# Philips Handy
XX:XX:XX:XX:XX:XX
# Stephan OLB
XX:XX:XX:XX:XX:XX
# Knirps
XX:XX:XX:XX:XX:XX
# Heike
XX:XX:XX:XX:XX:XX
# Tablet
XX:XX:XX:XX:XX:XX
# Nexus 5 user1
XX:XX:XX:XX:XX:XX
# Nexus 5
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
# Bettinas Nexus 5
XX:XX:XX:XX:XX:XX
#  Flos Horst Thinkpad
XX:XX:XX:XX:XX:XX
# Tim Smartphone
XX:XX:XX:XX:XX:XX
# delllaptop
XX:XX:XX:XX:XX:XX
# Janna iPhone
XX:XX:XX:XX:XX:XX
# Philip 
XX:XX:XX:XX:XX:XX
# user1 Bremer Smartphone
XX:XX:XX:XX:XX:XX
# user1 Bremer Notebook
XX:XX:XX:XX:XX:XX
# LG v500 Tablet Bettina
XX:XX:XX:XX:XX:XX
# Nexus 5 am Server
XX:XX:XX:XX:XX:XX
# HomePhone
XX:XX:XX:XX:XX:XX
# Teresas Smartphone
XX:XX:XX:XX:XX:XX
# Becky Kindle
XX:XX:XX:XX:XX:XX
# Flos Nexus 5
XX:XX:XX:XX:XX:XX
# Getrut Volkerts Smartphone
XX:XX:XX:XX:XX:XX
# Hero Notebook
XX:XX:XX:XX:XX:XX
XX:XX:XX:XX:XX:XX
# Krey
XX:XX:XX:XX:XX:XX
# Krey Dell-Notebook Celina (erna)
XX:XX:XX:XX:XX:XX
# Krey Dell-Notebook Carolin (liselotte)
XX:XX:XX:XX:XX:XX


Changes in /etc/udev/rules.d/10-wlan-stick.rules

File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--

Click here for a download of the complete file: /etc/udev/rules.d/10-wlan-stick.rules

Changed on 13.10.15
Issued by olli
Beginning line 1

Disable Power saving - May cause problems like "Warning - Data pending for entry X 4 in queue"

KERNEL=="wlan0", ACTION=="add", RUN+="/usr/sbiniw dev wlan0 set power_save off"
KERNEL=="wlan1", ACTION=="add", RUN+="/usr/sbiniw dev wlan1 set power_save off"

Setting up services

For starting the new service after system reboot you should add it to a runlevel with the following command(s):

rc-update add hostapd default
rc-update add net.wlan0 

Please send a feedback to: doc<at>gabosh.net

Howto listing
File Index

Here you can find the official Gentoo Linux Forums where you can find a lot of answers.

Here a link to the official Gentoo Linux Homepage.

Edit Howto

About / Impressum

Click here for About / Impressum

Wishlist

If you want to support my work you can find my Amazon whishlist here