Я использую Ubuntu Bionic OS для моего устройства NanoPi M1 plus.

Я сделал роутер Wi-Fi, работающий в 2 режимах. eth0 <-> wlan0 & wlan1 <-> wlan0

Я могу запустить точку доступа с помощью интерфейса wlan0, но не могу подключить к нему свое устройство (мобильный телефон).

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

/ и т.д. / сеть / интерфейсы

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 оставил комментарий

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

/etc/sysctl.conf читает

net.ipv4.ip_forward=1

Там нет ошибки в выполнении:

systemctl start hostapd
systemctl start dnsmasq

Вывод статуса systemctl -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.

По этой ссылке я добавил правило iptables:

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

В чем здесь проблема? Почему я не могу подключиться к точке доступа?

0