Skip to content

Commit 2da9f2b

Browse files
miniupnpd: Better document and reformat default upnpd UCI config file
and add (template) ACL entry for low ports (<1024) denied by default, current behaviour Signed-off-by: Self Hosting Group <[email protected]>
1 parent 1ed4eb6 commit 2da9f2b

File tree

1 file changed

+35
-24
lines changed

1 file changed

+35
-24
lines changed

net/miniupnpd/files/upnpd.config

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
1-
config upnpd config
2-
option enabled 0
3-
option enable_pcp_pmp 1
4-
option enable_upnp 1
5-
option allow_third_party_mapping 0
6-
option log_output 0
7-
option download_kbps 100000
8-
option upload_kbps 50000
9-
#by default, looked up dynamically from ubus
10-
# option external_iface wan
11-
option internal_iface lan
12-
option port 5000
13-
option upnp_lease_file /var/run/miniupnpd.leases
14-
option upnp_igd_compat igdv1
1+
# UPnP IGD & PCP/NAT-PMP service configuration
2+
3+
config upnpd 'config'
4+
option enabled 0
5+
option enable_upnp 1
6+
option enable_pcp_pmp 1
7+
option upnp_igd_compat igdv1
8+
option download_kbps 100000
9+
option upload_kbps 50000
10+
option allow_third_party_mapping 0
11+
# Multiple LAN interfaces can be specified, separated by a space
12+
option internal_iface 'lan'
13+
# By default, looked up dynamically from ubus
14+
#option external_iface wan
15+
option ipv6_disable 0
16+
option upnp_lease_file /var/run/miniupnpd.leases
17+
18+
# Service access control list configuration (IPv6 always allowed)
19+
20+
config perm_rule
21+
option action allow
22+
option ext_ports 1024-65535
23+
option int_addr 0.0.0.0/0
24+
option int_ports 1024-65535
25+
option comment 'Allow high ports'
1526

1627
config perm_rule
17-
option action allow
18-
option ext_ports 1024-65535
19-
option int_addr 0.0.0.0/0 # Does not override secure_mode
20-
option int_ports 1024-65535
21-
option comment "Allow high ports"
28+
option action deny
29+
option ext_ports 1-1023
30+
option int_addr 0.0.0.0/0
31+
option int_ports 1-1023
32+
option comment 'Low ports'
2233

2334
config perm_rule
24-
option action deny
25-
option ext_ports 0-65535
26-
option int_addr 0.0.0.0/0
27-
option int_ports 0-65535
28-
option comment "Default deny"
35+
option action deny
36+
option ext_ports 1-65535
37+
option int_addr 0.0.0.0/0
38+
option int_ports 1-65535
39+
option comment 'Deny by default'

0 commit comments

Comments
 (0)