400-neighbour-info-firewall 784 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/lua
  2. local uci = require('simple-uci').cursor()
  3. -- Allow incoming respondd replies to queries on WAN
  4. -- If the query was via multicast, the response isn't matched by --state RELATED
  5. uci:section('firewall', 'rule', 'wan_respondd_reply',
  6. {
  7. name = 'wan_respondd_reply',
  8. src = 'wan',
  9. src_ip = 'fe80::/64',
  10. src_port = '1001',
  11. dest_port = '32768:61000', -- see /proc/sys/net/ipv4/ip_local_port_range
  12. proto = 'udp',
  13. target = 'ACCEPT',
  14. }
  15. )
  16. uci:section('firewall', 'rule', 'mesh_respondd_reply',
  17. {
  18. name = 'mesh_respondd_reply',
  19. src = 'mesh',
  20. src_ip = 'fe80::/64',
  21. src_port = '1001',
  22. dest_port = '32768:61000', -- see /proc/sys/net/ipv4/ip_local_port_range
  23. proto = 'udp',
  24. target = 'ACCEPT',
  25. }
  26. )
  27. uci:save('firewall')