diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2022-02-23 20:19:37 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2022-02-23 20:43:27 -0500 |
| commit | 12192865c3ca0e1c2139afabab508e0087b14982 (patch) | |
| tree | 26ea5454dc976e87186e369685a1ac987bab2a61 /etc/local.d/03-miniupnpd.start | |
| download | alpine-home-router-1.0.tar.gz alpine-home-router-1.0.tar.xz | |
Diffstat (limited to 'etc/local.d/03-miniupnpd.start')
| -rwxr-xr-x | etc/local.d/03-miniupnpd.start | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/etc/local.d/03-miniupnpd.start b/etc/local.d/03-miniupnpd.start new file mode 100755 index 0000000..a1a0656 --- /dev/null +++ b/etc/local.d/03-miniupnpd.start @@ -0,0 +1,33 @@ +#!/bin/sh +. /etc/local.d/vars.sh +conf="/etc/miniupnpd/miniupnpd.conf" +lease_file=/var/lib/misc/upnp.leases + +cat > "$conf" <<EOF +ext_ifname=$wan +listening_ip=$lan +# ext_ip= +# ext_stun_host=stun.stunprotocol.org +# ext_perform_stun=yes +model_number=$(uname -r | grep -oE '[0-9.]+' | sed 1q) +serial=12345678 +enable_natpmp=yes +enable_upnp=yes +lease_file=$lease_file +# Secure Mode, UPnP clients can only add mappings to their own IP +secure_mode=yes +presentation_url=http://$lan_ip +clean_ruleset_interval=600 +min_lifetime=120 +max_lifetime=86400 +# UUID, generate your own UUID with "make genuuid" +uuid=$(uuidgen) +# allow 1024-65535 $lan_net/$lan_mask_bits 1024-65535 +# deny 0-65535 0.0.0.0/0 0-65535 +EOF + +echo "Generating miniupnpd conf:" + +cat "$conf" + +. /etc/local.d/vars_end.sh |
