Tidak dapat terhubung ke AP


0

saya menggunakan Ubuntu Bionic OS untuk perangkat NanoPi M1 plus saya.

Saya telah membuat router wifi beroperasi dalam 2 mode. eth0 & lt; - & gt; wlan0 & amp; wlan1 & lt; - & gt; wlan0

Saya dapat memulai AP menggunakan antarmuka wlan0 tetapi tidak dapat menghubungkan perangkat saya (ponsel) ke sana.

ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.55.225  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fc00::c539:b3ac:9982:9bf7  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::885d:eed8:b467:4203  prefixlen 64  scopeid 0x20<link>
        inet6 fc00::7a4a:7593:a41e:d5b6  prefixlen 64  scopeid 0x0<global>
        ether 02:81:14:a2:1b:15  txqueuelen 1000  (Ethernet)
        RX packets 1721  bytes 113112 (113.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 168  bytes 18534 (18.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 39

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  (Local Loopback)
        RX packets 109  bytes 7403 (7.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 109  bytes 7403 (7.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether b0:f1:ec:2c:dd:0c  txqueuelen 1000  (Ethernet)
        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

wlan1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c0:25:e9:25:ab:14  txqueuelen 1000  (Ethernet)
        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

/ etc / network / interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet static
    address 172.24.1.1
    netmask 255.255.255.0
    network 172.24.1.0
    broadcast 172.24.1.255

allow-hotplug wlan1
iface wlan1 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

/etc/hostapd/hostapd.conf

interface=wlan0
driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid="WiFI Box"
hw_mode=g
channel=1
beacon_int=100
auth_algs=3

/etc/dnsmasq.conf

port=8051
no-resolv
server=8.8.8.8
interface=wlan0
listen-address=172.24.1.1
dhcp-range=172.24.0.50,172.24.0.150,12h

/ etc / default / hostapd telah dihapus komentar

DAEMON_CONF="/etc/hostapd/hostapd.conf"

/etc/sysctl.conf membaca

net.ipv4.ip_forward=1

Tidak ada kesalahan dalam menjalankan:

systemctl start hostapd
systemctl start dnsmasq

Output dari systemctl status -l dnsmasq

dnsmasq: syntax check OK.
started, version 2.79 cachesize 150
compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
warning: interface wlan0 does not currently exist
warning: ignoring resolv-file flag because no-resolv is set
DHCP, IP range 172.24.0.50 -- 172.24.0.150, lease time 12h
using nameserver 8.8.8.8#53
read /etc/hosts - 6 addresses
/etc/resolvconf/update.d/libc: Warning: 
/etc/resolv.conf is not a symbolic link
Started dnsmasq - A lightweight DHCP and caching DNS server.

Sesuai ini link Saya menambahkan aturan iptables:

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"

apa yang terjadi disini? Mengapa saya tidak dapat terhubung ke Titik Akses?

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.