6
August
2020
How to block an IP or MAC address on a router in OpenWrt
17:18

How to block an IP or MAC address on a router in OpenWrt

6 August 2020 17:18

In the network router ("Router") tp-link с прошивкой OpenWrT needed to block the MAC address of the network device in the local network so that the device did not have access to the Internet.

Openw firmwarert хорошо подходит для "освежения" старых Wi-Fi маршрутизаторов (называемых в обиходе "Wi-Fi роутерами") в сетях с низкой и средней нагрузкой. Она имеет расширенные возможности - такие как управление NAT, DHCP и FireWall (по типу ip tables). В отличие от фирменной прошивки, в OpenWrt есть дополнительный модуль для управления пропускной способностью (шейпингом трафика) - sqm-scripts (и luci-app-sqm). Кроме того, OpenWrT works much more stable (the router never freezes and does not require rebooting).

The Wi-Fi network intended for employees has a device with the IP address and Mac, which was not there before.

An unusual IP address was visible on the laying "STatus" - "Overview" в разделе DHCP leaSES. The task is to block the device at the MAC address.

Procedure:

  1. In Openwrt в графической оболочке LuCi на закладке Status - OverView highlighted the MAC address and copied it into the clipboard.

  2. Opened the menu item Network - Firewall
    FIrewaLL

  3. I switched to the bookmark "traffic rUles ".

  4. At the bottom of the web page created a new rule: "New Forward rule" , назвал его "block-ip "
    Block IP

    • Name: block_IP
    • SOUrce zone: lan
    • Destination zone: wan
      I pressed the "Add and Edit" button.
  5. In the parameters rules, in the field "SOUrce MAC address" вместо значения "any" нужно выбрать из списка IP и MAC из существующих или добавить произвольный MAC адрес: "-- custom --".

In the field "Source MAC address" выбрал -- custom -- и вставил из буфера обмена MAC адрес из буфера обмена.
Custom

  1. Indicated the action for processing packages - instead of "accept" указал "rEject ", which means - _) TCP -IP and UDP packages with these parameters
    reject and aPPLY

  2. Applied the rule with pressing the " s buttonave aND Apply ".

The passage of packages to the specified MAC address was blocked.

Source:https: // bokunokeiken.wordpress.com/2015/06/27/how-to-block-device-on-openwrt-based-on-mac-address/



Related publications