Skip to content

Commit 8aa9702

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 7e80310 commit 8aa9702

File tree

1 file changed

+35
-23
lines changed

1 file changed

+35
-23
lines changed

net/miniupnpd/files/upnpd.config

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
1-
config upnpd config
2-
option enabled 0
3-
option enable_pcp_pmp 1
4-
option enable_upnp 1
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+
# UPnP IGD compatibility mode is IGDv1 by default due to still existing client issues
8+
option upnp_igd_compat igdv1
9+
option download_kbps 100000
10+
option upload_kbps 50000
11+
# The allow_third_party_maps option behaves in the opposite way to the previous secure_mode UCI option
512
option allow_third_party_maps 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
13+
# By default, looked up dynamically from ubus
14+
# option external_iface wan
15+
option internal_iface lan
16+
option log_output 0
17+
option upnp_lease_file /var/run/miniupnpd.leases
18+
19+
# Service access control list configuration (IPv6 always allowed)
20+
21+
config perm_rule
22+
option action allow
23+
option ext_ports 1024-65535
24+
option int_addr 0.0.0.0/0
25+
option int_ports 1024-65535
26+
option comment 'Allow high ports'
1527

1628
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"
29+
option action deny
30+
option ext_ports 1-1023
31+
option int_addr 0.0.0.0/0
32+
option int_ports 1-1023
33+
option comment 'Low ports'
2234

2335
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"
36+
option action deny
37+
option ext_ports 1-65535
38+
option int_addr 0.0.0.0/0
39+
option int_ports 1-65535
40+
option comment 'Deny by default'

0 commit comments

Comments
 (0)