Added chain rule to filter table so udp stun incoming connections rul… #13951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Maintainer: @neheb @ptpt52
Compile tested: (ath79, tplink_tl-wr941-v2, openwrt-19.07)
Run tested: (ath79, tplink_tl-wr941-v2, openwrt-19.07)
Added to /etc/config/upnpd
option use_stun '1'
option stun_host 'stun.stunprotocol.org'
option stun_port '3478'
Make sure that no UDP rule exists on the firewall to accept all connections and check miniupnpd system logs to see it was successful.
Description:
Fix this issue https://forum.openwrt.org/t/miniupnpd-in-trunk-stun-setup/18688
For the miniupnpd stun protocol to work correctly to find out the external IP address dynamically, it opens rules in the table 'filter' to receive incoming UDP connections for the router IP but there was no chain rule on the zone input referencing the MINIUPNPD table and so it couldn't receive the expected connections.
The fix was to add a chain rule in the zone input to check the MINIUPNPD table before rejecting all connections.
Should I make another pull request for the master branch? I will not be able to test this on the new version.