All,
Here is a test script - updated for OpenWrt 22.03.0. Thanks to all on the 44list who previously worked on the iptables/ipset version in the Wiki now. Feel free to ask me any questions, provide feedback, etc. Any OpenWrt operators, please let me know the performance of this script, so I can update the Wiki. No additional packages should be needed (except the the C/C++ library already required to run ampr-ripd).
#!/bin/sh# load encap.txt into ipipfilter list PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" cd /var/lib/ampr-ripd || exit 1 #ipset -N ipipfilter hash:ip 2>/dev/null#ipset flush ipipfilter#ipset -A ipipfilter 169.228.34.84 nft flush set inet fw4 ipipfilternft add element inet fw4 ipipfilter { 169.228.34.84 } grep addprivate encap.txt | sed -e 's/.*encap //' | sort -u | while read ipdo nft add element inet fw4 ipipfilter { $ip }done
-- 73,
- Lynwood KB3VWG