Hallo Ubuntuusers,
Ich scheitere leider an einer Netzwerkbrücke, die ein WLAN-Netzwerk erstellen soll und die Verbindung dann über einen Ubuntu-Server, der per LAN Kabel mit einer Fritz Box verbunden ist, zum Internet herstellen soll. Das Schema wie ich mir das vorstelle :
client- Fritz Wlan Stick (wlx246511420f5f) - Ubuntu Server - Lan (ens32) - Fritz Box - Internet
Ich habe mich bis jetzt an den Artikel WLAN Router gehalten (https://wiki.ubuntuusers.de/WLAN_Router/), scheitere leider aber schon bei Hostapd , da das Programm nach kurzer Zeit mit der Beispielkonfiguration abbricht.
Ausgabe: sudo ifconfig -a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ens32 Link encap:Ethernet HWaddr d0:27:88:17:e7:9a inet addr:192.168.178.20 Bcast:192.168.178.255 Mask:255.255.255.0 inet6 addr: 2a02:810d:a33f:f38c:d227:88ff:fe17:e79a/64 Scope:Global inet6 addr: fe80::d227:88ff:fe17:e79a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:109 errors:0 dropped:0 overruns:0 frame:0 TX packets:62 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12289 (12.2 KB) TX bytes:8549 (8.5 KB) Interrupt:16 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:160 errors:0 dropped:0 overruns:0 frame:0 TX packets:160 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB) wlx246511420f5f Link encap:Ethernet HWaddr 24:65:11:42:0f:5f BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
Hostapd Konfigurationsdatei aus Wiki übernommen :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | # Schnittstelle und Treiber interface=wlx246511420f5f driver=nl80211 # WLAN-Konfiguration ssid=WLAN_AP-SSID channel=1 # ESSID sichtbar ignore_broadcast_ssid=0 # Ländereinstellungen country_code=DE ieee80211d=1 # Übertragungsmodus hw_mode=g # Optionale Einstellungen # supported_rates=10 20 55 110 60 90 120 180 240 360 480 540 # Draft-N Modus aktivieren (optional, nur für entsprechende Karten) # ieee80211n=1 # Übertragungsmodus / Bandbreite 40MHz # ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40] # Beacons beacon_int=100 dtim_period=2 # MAC-Authentifizierung macaddr_acl=0 # max. Anzahl der Clients max_num_sta=20 # Größe der Datenpakete/Begrenzung rts_threshold=2347 fragm_threshold=2346 # hostapd Log Einstellungen logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 # temporäre Konfigurationsdateien dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 # Authentifizierungsoptionen auth_algs=3 # wmm-Funktionalität wmm_enabled=0 # Verschlüsselung / hier rein WPA2 wpa=2 rsn_preauth=1 rsn_preauth_interfaces=wlan0 wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP # Schlüsselintervalle / Standardkonfiguration wpa_group_rekey=600 wpa_ptk_rekey=600 wpa_gmk_rekey=86400 # Zugangsschlüssel (PSK) / hier in Klartext (ASCII) wpa_passphrase=12345678 |
Ausgabe: iw list (fritz Wlan Stick) (Ausschnitt)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | max # scan SSIDs: 4 max scan IEs length: 2257 bytes Retry short limit: 7 Retry long limit: 4 Coverage class: 0 (up to 0m) Device supports RSN-IBSS. Supported Ciphers: * WEP40 (00-0f-ac:1) * WEP104 (00-0f-ac:5) * TKIP (00-0f-ac:2) * CCMP (00-0f-ac:4) * 00-0f-ac:10 * GCMP (00-0f-ac:8) * 00-0f-ac:9 Available Antennas: TX 0 RX 0 Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor * mesh point |
Wenn ich nun Hostapd im Debug Modus (sudo hostapd -dd /etc/hostapd.conf) starte erscheint folgende Ausgabe und das Programm beendet sich kurze Zeit später.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | random: Trying to read entropy from /dev/random Configuration file: /etc/hostapd.conf Line 49: DEPRECATED: 'dump_file' configuration variable is not used anymore ctrl_interface_group=0 rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0 nl80211: Supported cipher 00-0f-ac:1 nl80211: Supported cipher 00-0f-ac:5 nl80211: Supported cipher 00-0f-ac:2 nl80211: Supported cipher 00-0f-ac:4 nl80211: Supported cipher 00-0f-ac:10 nl80211: Supported cipher 00-0f-ac:8 nl80211: Supported cipher 00-0f-ac:9 nl80211: Using driver-based off-channel TX nl80211: interface wlx246511420f5f in phy phy0 nl80211: Set mode ifindex 3 iftype 3 (AP) nl80211: Setup AP(wlx246511420f5f) - device_ap_sme=0 use_monitor=0 nl80211: Subscribe to mgmt frames with AP handle 0x5568e6beec90 nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x5568e6beec90 match= nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x5568e6beec90 match= nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x5568e6beec90 match= nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x5568e6beec90 match= nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x5568e6beec90 match= nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5568e6beec90 match= nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x5568e6beec90 match= nl80211: Add own interface ifindex 3 nl80211: if_indices[16]: 3 phy: phy0 BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits) wlx246511420f5f: interface state UNINITIALIZED->COUNTRY_UPDATE Previous country code DE, new country code DE nl80211: Regulatory information - country=DE (DFS-ETSI) nl80211: 2400-2483 @ 40 MHz 20 mBm nl80211: 5150-5250 @ 80 MHz 20 mBm (no outdoor) nl80211: 5250-5350 @ 80 MHz 20 mBm (no outdoor) (DFS) nl80211: 5470-5725 @ 160 MHz 26 mBm (DFS) nl80211: 57000-66000 @ 2160 MHz 40 mBm nl80211: Added 802.11b mode based on 802.11g information Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=20 dBm Allowed channel: mode=2 chan=38 freq=5190 MHz max_tx_power=20 dBm Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=20 dBm Allowed channel: mode=2 chan=42 freq=5210 MHz max_tx_power=20 dBm Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=20 dBm Allowed channel: mode=2 chan=46 freq=5230 MHz max_tx_power=20 dBm Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm Completing interface initialization Mode: IEEE 802.11g Channel: 1 Frequency: 2412 MHz DFS 0 channels required radar detection nl80211: Set freq 2412 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2412 MHz, cf2=0 MHz) * freq=2412 * vht_enabled=0 * ht_enabled=0 RATE[0] rate=10 flags=0x1 RATE[1] rate=20 flags=0x1 RATE[2] rate=55 flags=0x1 RATE[3] rate=110 flags=0x1 RATE[4] rate=60 flags=0x0 RATE[5] rate=90 flags=0x0 RATE[6] rate=120 flags=0x0 RATE[7] rate=180 flags=0x0 RATE[8] rate=240 flags=0x0 RATE[9] rate=360 flags=0x0 RATE[10] rate=480 flags=0x0 RATE[11] rate=540 flags=0x0 hostapd_setup_bss(hapd=0x5568e6bf0430 (wlx246511420f5f), first=1) wlx246511420f5f: Flushing old station entries nl80211: flush -> DEL_STATION wlx246511420f5f (all) wlx246511420f5f: Deauthenticate all stations nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3 nl80211: send_mlme -> send_frame nl80211: send_frame - Use bss->freq=2412 nl80211: send_frame -> send_frame_cmd nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0 CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 24 65 11 42 0f 5f 24 65 11 42 0f 5f 00 00 02 00 nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0) wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 Using interface wlx246511420f5f with hwaddr 24:65:11:42:0f:5f and ssid "WLAN_AP-SSID" Deriving WPA PSK based on passphrase SSID - hexdump_ascii(len=12): 57 4c 41 4e 5f 41 50 2d 53 53 49 44 WLAN_AP-SSID PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] random: Got 20/20 bytes from /dev/random Get randomness: len=32 entropy=0 GMK - hexdump(len=32): [REMOVED] Get randomness: len=32 entropy=0 Key Counter - hexdump(len=32): [REMOVED] WPA: Delay group state machine start until Beacon frames have been configured RSN pre-auth interface 'wlan0' l2_packet_init: ioctl[SIOCGIFINDEX]: No such device Failed to open register layer 2 access to ETH_P_PREAUTH Initialization of RSN pre-authentication failed. wlx246511420f5f: Flushing old station entries nl80211: flush -> DEL_STATION wlx246511420f5f (all) wlx246511420f5f: Deauthenticate all stations nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3 nl80211: send_mlme -> send_frame nl80211: send_frame - Use bss->freq=2412 nl80211: send_frame -> send_frame_cmd nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0 CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 24 65 11 42 0f 5f 24 65 11 42 0f 5f 00 00 03 00 nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0) wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=3 (wlx246511420f5f) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 hostapd_free_hapd_data(wlx246511420f5f) Interface initialization failed wlx246511420f5f: interface state COUNTRY_UPDATE->DISABLED wlx246511420f5f: AP-DISABLED wlx246511420f5f: Unable to setup interface. hostapd_interface_deinit_free(0x5568e6bef4d0) hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1 hostapd_interface_deinit(0x5568e6bef4d0) wlx246511420f5f: interface state DISABLED->DISABLED hostapd_bss_deinit: deinit bss wlx246511420f5f wlx246511420f5f: Deauthenticate all stations nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3 nl80211: send_mlme -> send_frame nl80211: send_frame - Use bss->freq=2412 nl80211: send_frame -> send_frame_cmd nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0 CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 24 65 11 42 0f 5f 24 65 11 42 0f 5f 00 00 03 00 nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0) wlx246511420f5f: AP-DISABLED hostapd_cleanup(hapd=0x5568e6bf0430 (wlx246511420f5f)) hostapd_free_hapd_data: Interface wlx246511420f5f wasn't started hostapd_interface_deinit_free: driver=0x5568e4d24d00 drv_priv=0x5568e6bf1370 -> hapd_deinit nl80211: deinit ifname=wlx246511420f5f disabled_11b_rates=0 nl80211: Remove monitor interface: refcount=0 nl80211: Remove beacon (ifindex=3) netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP) nl80211: Set mode ifindex 3 iftype 2 (STATION) nl80211: Teardown AP(wlx246511420f5f) - device_ap_sme=0 use_monitor=0 nl80211: Unsubscribe mgmt frames handle 0x8888dde06e366419 (AP teardown) hostapd_interface_free(0x5568e6bef4d0) hostapd_interface_free: free hapd 0x5568e6bf0430 hostapd_cleanup_iface(0x5568e6bef4d0) hostapd_cleanup_iface_partial(0x5568e6bef4d0) hostapd_cleanup_iface: free iface=0x5568e6bef4d0 |
Ich bin euch für jede Hilfe dankbar !