[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to share the Internet with Linux and an iPad by Wi-Fi?



Thank you :)

On Sat, 2012-03-10 at 13:45 +0000, debian-user-digest-request@lists.debian.org wrote:
On Sat, 2012-03-10 at 01:53 +0200, Andrei POPESCU wrote:
On Vi, 09 mar 12, 16:48:58, Ralf Mardorf wrote:
> On Fri, 2012-03-09 at 11:59 +0200, Andrei POPESCU wrote:
> > On Vi, 09 mar 12, 05:14:39, Ralf Mardorf wrote:
> root@oz:~# cat /etc/hostapd/hostapd.conf
> 
> # Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
> # Default: IEEE 802.11b
> hw_mode=a
 
You probably want/need hw_mode=g here

Ok

> # Channel number (IEEE 802.11)
> # (default: 0, i.e., not set)
> # Please note that some drivers (e.g., madwifi) do not use this value
> from
> # hostapd and the channel will need to be configuration separately with
> # iwconfig.
> channel=60

This seems wrong, try 7

Ok

> # Station MAC address -based authentication
> # Please note that this kind of access control requires a driver that
> uses
> # hostapd to take care of management frame processing and as such, this
> can be
> # used with driver=hostap or driver=nl80211, but not with
> driver=madwifi.

Are you sure about this one?

Exceptionally I should post in HTML. "driver=madwifi." is part of the explaination, IOW it's commented out. I don't know the drivers, have to read about them later.

> root@oz:~# cat /etc/dnsmasq.conf
 
> # If you want dnsmasq to listen for DHCP and DNS requests only on
> # specified interfaces (and the loopback) give the name of the
> # interface (eg eth0) here.
> # Repeat the line for more than one interface.
> #interface=

You should probably set this to wlan0, just to make sure it doesn't mess 
with eth0 and ppp0

Ok

> # Uncomment this to enable the integrated DHCP server, you need
> # to supply the range of addresses available for lease and optionally
> # a lease time. If you have more than one network, you will need to
> # repeat this for each network on which you want to supply DHCP
> # service.
> # dhcp-range=192.168.10.24,192.168.10.25,12h

You should enable a line like this, just make sure the range does *not* 
include 192.168.10.24 (which is what you configured for wlan0)

Ok

> dhcp-range=192.168.10.24,static
 
Not needed.

Ok

Hope this helps,
Andrei

In the meantime I edited the files myself, on the quick I'll re-edit the re-edited files, hopefully this won't cause new issues. After shopping I'll try again and take some time for it.

This [1] doesn't make the LED flashing again, it's still dead.

root@oz:~# iwlist scan
lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

wlan0     No scan results

ppp0      Interface doesn't support scanning.

For the default install, just using pppoeconf, nm not set, the LED flashed from time to time and I guess the iwlist scanning would show what's on the air. Using Mint Lisa now, iwlist still does. When nm was set, the LED flashed continuously. Now it looks like the driver or firmware is borked, the LED never will flash. Should I continue after restoring the complete install from a backup or is it just because of the new and wrong settings? I wonder because I removed and installed completely before I started the second trail, but I didn't get the LED alive, even without new settings.

Regards,
Ralf

[1]
root@oz:~# cat /etc/hostapd/hostapd.conf
# /usr/share/doc/hostapd/examples/hostapd.conf.gz

interface=wlan0

# hostapd event logger configuration
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2

# Dump file for state information (on SIGUSR1)
dump_file=/tmp/hostapd.dump

# Interface for separate control program.
ctrl_interface=/var/run/hostapd

# By default, hostapd is configured to use gid 0 (root).
#ctrl_interface_group=wheel
ctrl_interface_group=0

##### IEEE 802.11 related configuration #######################################

# SSID to be used in IEEE 802.11 management frames
# http://www.webopedia.com/TERM/S/SSID.html
ssid=test

#country_code=US

# (default: 0 = disabled)
#ieee80211d=1

# Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
# Default: IEEE 802.11b
hw_mode=g

# Channel number (IEEE 802.11)
channel=7

# Beacon interval in kus (1.024 ms)
beacon_int=100

#
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0

# bit 0 = Open System Authentication
# bit 1 = Shared Key Authentication (requires WEP)
auth_algs=3

# 1 = send empty (length=0) SSID in beacon and ignore probe request for
#     broadcast SSID
# 2 = clear SSID (ASCII 0), but keep the original length (this may be required
#     with some clients that do not support empty SSID) and ignore probe
#     requests for broadcast SSID
ignore_broadcast_ssid=0

#
wmm_enabled=1

# Low priority / AC_BK = background
#wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmin=5
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10

# Normal priority / AC_BE = best effort
wmm_ac_be_aifs=3
#wmm_ac_be_cwmin=4
wmm_ac_bk_cwmin=5
#wmm_ac_be_cwmax=10
wmm_ac_be_cwmax=7
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7

# High priority / AC_VI = video
wmm_ac_vi_aifs=2
#wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmin=4
#wmm_ac_vi_cwmax=4
wmm_ac_vi_cwmax=5
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188

# Highest priority / AC_VO = voice
wmm_ac_vo_aifs=2
#wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmin=3
#wmm_ac_vo_cwmax=3
wmm_ac_vo_cwmax=4
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102

# Static WEP key configuration
wep_default_key=0
wep_key0=123456789a

##### Integrated EAP server ###################################################
# http://de.wikipedia.org/wiki/Extensible_Authentication_Protocol
eap_server=0

#private_key=/etc/hostapd.server.prv

# Passphrase for private key
private_key_passwd=secret passphrase

# 0 = do not verify CRLs (default)

###############################################################################
##### WPA/IEEE 802.11i configuration ##########################################
###############################################################################

# Enable WPA. Setting this variable configures the AP to require WPA (either
# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either
# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK.
# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys),
# RADIUS authentication server must be configured, and WPA-EAP must be included
# in wpa_key_mgmt.
# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0)
# and/or WPA2 (full IEEE 802.11i/RSN):
# bit0 = WPA
# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
wpa=1

# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
# (8..63 characters) that will be converted to PSK. This conversion uses SSID
# so the PSK changes when ASCII passphrase is used and the SSID is changed.
# wpa_psk (dot11RSNAConfigPSKValue)
# wpa_passphrase (dot11RSNAConfigPSKPassPhrase)
wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
wpa_passphrase=secret passphrase

# Optionally, WPA PSKs can be read from a separate text file (containing list
# of (PSK,MAC address) pairs. This allows more than one PSK to be configured.
# Use absolute path name to make sure that the files can be read on SIGHUP
# configuration reloads.
#wpa_psk_file=/etc/hostapd.wpa_psk

# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The
# entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be
# added to enable SHA256-based stronger algorithms.
# (dot11RSNAConfigAuthenticationSuitesTable)
wpa_key_mgmt=WPA-PSK WPA-EA
# Pairwise cipher for WPA (v1) (default: TKIP)
#wpa_pairwise=TKIP CCMP
# Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value)
#rsn_pairwise=CCMP

# Time interval for rekeying GTK (broadcast/multicast encryption keys) in
# seconds. (dot11RSNAConfigGroupRekeyTime)
#wpa_group_rekey=600

# Rekey GTK when any STA that possesses the current GTK is leaving the BSS.
# (dot11RSNAConfigGroupRekeyStrict)
#wpa_strict_rekey=1

# Time interval for rekeying GMK (master key used internally to generate GTKs
# (in seconds).
#wpa_gmk_rekey=86400

# Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of
# PTK to mitigate some attacks against TKIP deficiencies.
#wpa_ptk_rekey=600

# Enable IEEE 802.11i/RSN/WPA2 pre-authentication.

##### Wi-Fi Protected Setup (WPS) #############################################

# WPS state
# 0 = WPS disabled (default)

##### Multiple BSSID support ##################################################
#
# Above configuration is using the default interface (wlan#, or multi-SSID VLAN
# interfaces). Other BSSIDs can be added by using separator 'bss' with
# default interface name to be allocated for the data packets of the new BSS.



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



root@oz:~# cat /etc/dnsmasq.conf
# Configuration file for dnsmasq.
# "/usr/sbin/dnsmasq --help" "man 8 dnsmasq"

# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
#resolv-file=

# If you don't want dnsmasq to read /etc/resolv.conf or any other
# file, getting its servers from this file instead (see below), then
# uncomment this.
#no-resolv

# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv
# files for changes and re-read them then uncomment this.
#no-poll

# If you want dnsmasq to change uid and gid to something other
# than the default, edit the following lines.
#user=
#group=

interface=wlan0

# If you don't want dnsmasq to read /etc/hosts, uncomment the
# following line.
#no-hosts
# or if you want it to read another file, as well as /etc/hosts, use
# this.
#addn-hosts=/etc/banner_add_hosts

# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.
#expand-hosts

dhcp-range=192.168.10.25,192.168.10.26,12h

# Enable the address given for "judge" in /etc/hosts
# to be given to a machine presenting the name "judge" when
# it asks for a DHCP lease.
#dhcp-host=judge

# Send options to hosts which ask for a DHCP lease.
# See RFC 2132 for details of available options.
#dhcp-option=

# Enable dnsmasq's built-in TFTP server
#enable-tftp

# Set the cachesize here.
#cache-size=150

# If you want to disable negative caching, uncomment this.
#no-negcache

# Normally responses which come form /etc/hosts and the DHCP lease
# file have Time-To-Live set as zero, which conventionally means
# do not cache further. If you are happy to trade lower load on the
# server for potentially stale date, you can set a time-to-live (in
# seconds) here.
#local-ttl=

# Include a another lot of configuration options.
#conf-file=/etc/dnsmasq.more.conf
#conf-dir=/etc/dnsmasq.d
Reply to: