I am working on an embedded Linux system (kernel-5.10.24), there is a RTL8723 WIFI module in my system.

Now I configured the target board as WIFI AP with hostapd/udhcpd/dnsmasq.

The hostapd.conf is.


The udhcpd.conf is

start      #default:
end      #default:

# The interface that udhcpd will use
interface       wlan0           #default: eth0
remaining yes
opt       dns
opt       subnet
opt       router

The wlan0 in the system is configured with

After starting hostapd/udhcpd, I can connect my Windows PC to the AP, the PC is allocated an IP of

I can ping the AP's IP from PC, but I cannot ping my PC's IP from within the AP.

The networking info in AP is.

# ifconfig
lo        Link encap:Local Loopback
          inet addr:  Mask:
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:40 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3744 (3.6 KiB)  TX bytes:3744 (3.6 KiB)

wlan0     Link encap:Ethernet  HWaddr 30:95:87:XX:XX:XX
          inet addr:  Bcast:  Mask:
          RX packets:15966 errors:0 dropped:64 overruns:0 frame:0
          TX packets:7603 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20882819 (19.9 MiB)  TX bytes:647826 (632.6 KiB)

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     *        U     0      0        0 wlan0

Then I started to run iperf -s in the AP, and iperf -c -t 10 from my PC, it worked well.
But it failed if I ran iperf -c -t 10 in the AP.

I googled and found similar problems, but no solid solution/explanation of it.

The firewall settings in Linux AP is as follows,

# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

And the arping -I wlan0 can get the MAC of the Windows PC. But ping from Linux AP to Windows PC still failed.

  • If they can communicate one way (but not the other) that means routes are ok and anything below routes so layer 2 is ok too. You should look for a firewall on the client instead. As the PC is Windows there's no solution for this on this Unix/Linux SE.
    – A.B
    Commented Jan 17 at 17:53
  • You can install on the Linux AP the command arping (usually from iputils-arping / iputils package/sources, rather than from arping package) and run arping even if ICMP pings are blocked, usually ARP sortof pings are not.
    – A.B
    Commented Jan 17 at 18:00
  • In the Windows, I have WSL2 Linux installed. I can ping the AP from Windows command line and from WSL2 Linux. I will install arping in Linux AP, and try it.
    – wangt13
    Commented Jan 17 at 23:30
  • I tried arping -I wlan0 PC's IP, it worked. I updated the question with iptables settings, there should be NO firewall for outgoing ICMP, but I don't know why ping from the AP is still failed.
    – wangt13
    Commented Jan 18 at 0:11
  • The problem is on the Windows system.
    – A.B
    Commented Jan 18 at 1:03

1 Answer 1


I did one more test, and got the answer.

I set the Linux board as host mode, and connected it to an WIFI AP in office, it got an IP of
Then I connected the Windows PC to the same WIFI AP, its IP is

I can ping from the Windows PC to the Linux board, but failed to ping from Linux board to the Windows PC, the same problem as I posted in the question.

So I checked with IT team, and be confirmed that the Windows PC is configured with firewall to reject input ping on the 192.168 subnetwork.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .