Skip to content

Commit 79f8697

Browse files
committed
Option to block outgoing internet access for devices in firewall
1 parent 449ebeb commit 79f8697

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

config/firewall

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,14 @@ config rule
199199
{% endif %}
200200
{% endfor %}
201201

202+
{% if firewall is defined and firewall.block_wan_access is defined %}
203+
config rule
204+
option name 'Blocked-Devices'
205+
option src '*'
206+
option dest 'wan'
207+
option target 'REJECT'
208+
list proto 'all'
209+
{% for blocked_device in firewall.block_wan_access %}
210+
list src_mac '{{ blocked_device }}'
211+
{% endfor %}
212+
{% endif %}

inventory-sample.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,6 @@ openwrt:
269269
- 1.0.0.3
270270
hosts:
271271
- DD:45:4F:4A:2E:99
272+
firewall:
273+
block_wan_access:
274+
- DD:45:4F:4A:2E:99 # Block internet access for this device, but allow connecting to internal network

0 commit comments

Comments
 (0)