OpenWrt [LuCI] How to block ports games?

Hello, I have a router for OpenWrt [LuCI] I need to block certain ports but I don’t know how to do it! I’ve rummaged through the entire Internet I can’t find anything!

On Windows OS, this is done in the firewall -> outbound rule! But I don’t understand how to implement this on a router with OpenWrt [LuCI]. Need your help.

It is necessary to block the ports of the game servers so that the staff does not play at work! For example, port 27015.

Tried like this:
WAN='br-lan'
iptables -I FORWARD -i br-lan -p tcp/udp -d 27015 -j DROP

In LUCI (the GUI of OpenWRT), under Network -> Firewall -> Traffic rules, "New forward rules".

name: "all work no play..." (it's just a label, up to you)
source zone: lan
dest. zone: wan

click "add and edit"
destination port: 27015
action: drop (edit: reject is better)
optional: you may enter time restrictions but for the moment just keep it simple :slight_smile:

click "save and apply"
verify block works.

1 Like

I would suggest REJECT instead of DROP in this case.

3 Likes


where to input ports ?

Switch the protocol from any to tcp or tcp+udp to make the port inputs appear.