110-ffho-net-allow-ipv6-spaces 580 B

12345678910111213141516171819
  1. siteConfig = require("gluon.site_config")
  2. -- iterate through lists
  3. function list_iter (_table)
  4. local i = 0
  5. local n = table.getn(_table)
  6. return function ()
  7. i = i + 1
  8. if i <= n then return _table[i] end
  9. end
  10. end
  11. rule ('FFHO_NET_ONLY -p IPv6 --ip6-src fe80::/10 -j RETURN')
  12. rule ('FFHO_NET_ONLY -p IPv6 --ip6-dst ff00::/8 -j RETURN')
  13. rule ('FFHO_NET_ONLY -p IPv6 --ip6-src ' .. siteConfig.prefix6 .. ' -j RETURN')
  14. for prefix in list_iter(siteConfig.additional_prefix6) do
  15. rule ('FFHO_NET_ONLY -p IPv6 --ip6-src ' .. prefix .. ' -j RETURN')
  16. end