Force disconnect of individual wifi client

Hi,

I need to be able to disconnect a specific wifi client from RUT241 routers, preferably using the CLI. What are you using for this purpose?

Best regards,

  • Anders

Hi,

Thanks for reaching us, to disconnect a specific Wi-Fi client from RUT241 routers using the command line interface (CLI), you can use the following steps:

  • uci set wireless.@wifi-iface[0].macfilter=deny
  • uci add_list wireless.@wifi-iface[0].maclist=‘XX:XX:XX:XX:XX:XX’
  • uci commit wireless
  • /etc/init.d/wireless restart

If you’re more comfortable using the web interface, I recommend following the steps outlined in the documentation to set up the MAC filtering feature.

Thanks,
Mahmoud

Thanks :slight_smile: And there is no way of simply disconnecting a client without blocking their MAC address (and then unblock when they are allowed to connect again)?

Will the wireless restart command force all clients to reconnect?

Hello,

To block and disconnect a specific MAC address from the command line interface (CLI), you can follow these steps:

  1. Open the command line interface on your router.
  2. Enter the following commands to set up MAC filtering and block the specified MAC address:
  • uci set wireless.@wifi-iface[0].macfilter=deny
  • uci add_list wireless.@wifi-iface[0].maclist=XX:XX:XX:XX:XX:XX
  • uci commit wireless
  • reload_config

This will effectively block the MAC address ‘32:D9:09:EF:9A:3F’ from connecting to your wireless network.

If you want to remove the block and allow access again, you can use these commands:

  • uci set wireless.default_radio0.macfilter=‘disable’
  • uci commit wireless
  • reload_config

Additionally, if you want to forcefully disconnect a client without permanently blocking its MAC address, you can use the iw command. For instance, if your wireless interface is ‘wlan0’ and the client’s MAC address is ‘12:34:56:78:90:AB’, you would run:

  • iw dev wlan0 station del XX:XX:XX:XX:XX:XX

This command sends a deauthentication frame to the client, causing it to disconnect from the network temporarily. Please note that this method relies on the client’s behavior to reconnect once the deauthentication process is complete.

Will the wireless restart command force all clients to reconnect?

Yes, the command to restart the wireless interface.

Thanks,
Mahmoud

Thanks Mahmoud :slight_smile:

This topic was automatically closed after 15 days. New replies are no longer allowed.