You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否通过OpenWRT配置实现接入点仅允许单个客户端连接?

Single Client Limit for OpenWRT Wireless AP

Absolutely, you can set up your OpenWRT-based access point to only allow one client connection at a time using just built-in configurations—no external tools or extra packages required. Here's the straightforward way to do it:

Method 1: Use hostapd's Built-in Connection Limit

Hostapd (the daemon that manages wireless access points in OpenWRT) has a native setting to cap the number of connected clients. This is the most efficient approach since it blocks excess connection attempts directly at the AP level:

  • Log into your OpenWRT device via SSH (ssh root@[your-openwrt-ip]) or the LuCI web interface.
  • If using SSH, open the wireless configuration file with your preferred editor:
    vi /etc/config/wireless
    
  • Locate the config wifi-iface section corresponding to your target wireless network (look for lines like option ssid 'YourWiFiName' to identify it).
  • Add this line inside that section to enforce a single-client limit:
    option max_num_stations '1'
    
  • Save the file (in vi, press Esc then type :wq to save and exit).
  • Restart the wireless service to apply the changes:
    wifi reload
    

Once this is active, when one client is already connected, any subsequent devices trying to join will receive a rejection from the AP immediately—they won’t get an IP address or establish a connection at all.

Notes

  • This setting applies per wireless interface. If you have multiple SSIDs (e.g., 2.4GHz and 5GHz), you’ll need to add the line to each wifi-iface section you want to limit.
  • No additional software is needed—this uses OpenWRT’s default hostapd setup, so it’s fully self-contained within the system.

内容的提问来源于stack exchange,提问作者Kerberos

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.27 15:02:35