Raspberry Piでhostapdとisc-dhcp-serverを使用した無線ルーターがパスワードが違うとエラーが出る
以下のサイトを元にRaspberry Piでモバイルルーターの作成を行っております。
作成途中につきLTE接続は行わず、有線LANと無線LANで動作確認を行っております。
使用しているWi-FiアダプタはWI-U2-433DMです。
発生している問題・エラーメッセージ
service startでhostapdとisc-dhcp-serverは動いており、iPhoneでもSSIDが表示されるのですがパスワードを入力すると「"{SSID名}"用のパスワードが違います」と表示され、接続できません。
/usr/local/bin/hostapd -ddK /etc/hostapd/hostapd.confを実行した際のメッセージはこちらとなります。
nl80211: Set beacon (beacon_set=0) nl80211: Beacon head - hexdump(len=57): 80 00 00 00 ff ff ff ff ff ff 88 57 ee 94 bc c2 88 57 ee 94 bc c2 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 06 72 70 77 69 66 69 01 08 82 84 8b 96 0c 12 18 24 03 01 06 nl80211: Beacon tail - hexdump(len=31): 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 nl80211: ifindex=3 nl80211: beacon_int=100 nl80211: beacon_rate=0 nl80211: rate_type=0 nl80211: dtim_period=2 nl80211: ssid=rpwifi * beacon_int=100 * dtim_period=2 nl80211: hidden SSID not in use nl80211: privacy=1 nl80211: auth_algs=0x1 nl80211: wpa_version=0x2 nl80211: key_mgmt_suites=0x2 nl80211: pairwise_ciphers=0x10 nl80211: group_cipher=0x10 WPA: Start group state machine to set initial keys WPA: group state machine entering state GTK_INIT (VLAN-ID 0) Get randomness: len=16 entropy=0 GTK - hexdump(len=16): 55 f9 df b3 89 98 f2 b7 cb 18 4d 27 26 6d ce 73 WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0) wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=3 addr=0x8b184 key_idx=1 set_tx=1 seq_len=0 key_len=16 nl80211: KEY_DATA - hexdump(len=16): 55 f9 df b3 89 98 f2 b7 cb 18 4d 27 26 6d ce 73 broadcast key nl80211: Set wlan0 operstate 0->1 (UP) netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6 (IF_OPER_UP) nl80211: TX queue param set: queue=0 aifs=1 cw_min=3 cw_max=7 burst_time=15 --> res=-95 Failed to set TX queue parameters for queue 0. nl80211: TX queue param set: queue=1 aifs=1 cw_min=7 cw_max=15 burst_time=30 --> res=-95 Failed to set TX queue parameters for queue 1. nl80211: TX queue param set: queue=2 aifs=3 cw_min=15 cw_max=63 burst_time=0 --> res=-95 Failed to set TX queue parameters for queue 2. nl80211: TX queue param set: queue=3 aifs=7 cw_min=15 cw_max=1023 burst_time=0 --> res=-95 Failed to set TX queue parameters for queue 3. wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED wlan0: Setup of interface done. ctrl_iface not configured!
serviceのステータスと設定ファイルとバージョン
root@raspberrypi:/home/pi# uname -a Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux root@raspberrypi:/home/pi# hostapd -v hostapd v2.9 User space daemon for IEEE 802.11 AP management, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator Copyright (c) 2002-2019, Jouni Malinen <j@w1.fi> and contributors root@raspberrypi:/home/pi# ifconfig -a eth0: flags=4098<BROADCAST,MULTICAST> mtu 1500 ether b8:27:eb:3a:88:06 txqueuelen 1000 (イーサネット) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (ローカルループバック) RX packets 916 bytes 86876 (84.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 916 bytes 86876 (84.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.100.1 netmask 255.255.255.0 broadcast 192.168.100.255 inet6 fe80::8a57:eeff:fe94:bcc2 prefixlen 64 scopeid 0x20<link> ether 88:57:ee:94:bc:c2 txqueuelen 1000 (イーサネット) RX packets 29 bytes 0 (0.0 B) RX errors 0 dropped 211 overruns 0 frame 0 TX packets 1270 bytes 96564 (94.3 KiB) TX errors 0 dropped 66 overruns 0 carrier 0 collisions 0 root@raspberrypi:/home/pi# sudo systemctl status isc-dhcp-server ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server; generated) Active: active (running) since Tue 2020-05-19 15:54:37 JST; 38min ago Docs: man:systemd-sysv-generator(8) Process: 470 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 2200) Memory: 5.9M CGroup: /system.slice/isc-dhcp-server.service └─500 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf wlan0 5月 19 15:54:34 raspberrypi systemd[1]: Starting LSB: DHCP server... 5月 19 15:54:35 raspberrypi isc-dhcp-server[470]: Launching IPv4 server only. 5月 19 15:54:35 raspberrypi dhcpd[500]: Wrote 0 leases to leases file. 5月 19 15:54:35 raspberrypi dhcpd[500]: Server starting service. 5月 19 15:54:37 raspberrypi isc-dhcp-server[470]: Starting ISC DHCPv4 server: dhcpd. 5月 19 15:54:37 raspberrypi systemd[1]: Started LSB: DHCP server. root@raspberrypi:/home/pi# sudo systemctl status hostapd ● hostapd.service - LSB: Advanced IEEE 802.11 management daemon Loaded: loaded (/etc/init.d/hostapd; generated) Active: active (exited) since Tue 2020-05-19 15:54:34 JST; 38min ago Docs: man:systemd-sysv-generator(8) Process: 469 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS) 5月 19 15:54:34 raspberrypi systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon... 5月 19 15:54:34 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.
/etc/default/isc-dhcp-server
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server) # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf). #DHCPDv4_CONF=/etc/dhcp/dhcpd.conf #DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf DHCPDv4_CONF=/etc/dhcp/dhcpd.conf #DHCPDv6_CONF=/etc/dhcp/dhcpd.conf # Path to dhcpd's PID file (default: /var/run/dhcpd.pid). #DHCPDv4_PID=/var/run/dhcpd.pid #DHCPDv6_PID=/var/run/dhcpd6.pid # Additional options to start dhcpd with. # Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead #OPTIONS="" # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". #INTERFACESv4="" #INTERFACESv6="" #INTERFACES="eth0" INTERFACES="wlan0" INTERFACESv4="wlan0" #INTERFACESv6="wlan0"
/etc/dhcp.conf
一部割愛
#option domain-name "example.org"; #option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200; ddns-update-style none; authoritative; # ネットワークアドレスとサブネットマスク指定 subnet 192.168.100.0 netmask 255.255.255.0 { # 貸し出すIPアドレスの範囲指定 range 192.168.100.10 192.168.100.50; # ブロードキャストアドレス指定 option broadcast-address 192.168.100.255; # デフォルト貸出期間 default-lease-time 600; # 最大貸出期間 max-lease-time 7200; # ゲートウェイアドレス指定 option routers 192.168.100.1; # ドメイン名指定 option domain-name "local"; # ネームサーバーのホスト名 (Google) option domain-name-servers 8.8.8.8, 8.8.4.4; }
/etc/hostapd/hostapd.conf
interface=wlan0 #driver=rtl8812au #driver=rtl871xdrv driver=nl80211 ssid=rpwifi hw_mode=g channel=6 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=123456789 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP
/etc/default/hostapd
# Defaults for hostapd initscript # # WARNING: The DAEMON_CONF setting has been deprecated and will be removed # in future package releases. # # See /usr/share/doc/hostapd/README.Debian for information about alternative # methods of managing hostapd. # # Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration # file and hostapd will be started during system boot. An example configuration # file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz # #DAEMON_CONF="" DAEMON_CONF="/etc/hostapd/hostapd.conf" # Additional daemon options to be appended to hostapd command:- # -d show more debug messages (-dd for even more) # -K include key data in debug messages # -t include timestamps in some debug messages # # Note that -B (daemon mode) and -P (pidfile) options are automatically # configured by the init.d script and must not be added to DAEMON_OPTS. # #DAEMON_OPTS=""
/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 auto wlan0 iface wlan0 inet static address 192.168.100.1 network 192.168.100.0 netmask 255.255.255.0 gateway 192.168.11.1 #pre-up iptables-restore < /etc/iptables.ipv4.nat
試したこと
configの見直しを行い、wlan0のipを「192.168.100.1」で統一したつもりです。
別件でnetwork-managerを使用したホットスポットを利用した際もパスフレーズによるエラーが生じました。
1週間ほど悩んでおり、解決策が見当たらないのでお力を貸していただきたいです。
補足情報(FW/ツールのバージョンなど)
- /etc/default/hostapdにてDAEMON_CONFを宣言しているが、再起動時にAPが起動しない
- 再起動後に「iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE」を実行するが「iptables --list」に変化がなし
- werbブラウザにてgoogle.comなどの外へのアクセスができない
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。