400-respondd-firewall 1017 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/lua
  2. local uci = require('simple-uci').cursor()
  3. local site = require('gluon.site')
  4. uci:delete('firewall', 'wan_announced')
  5. -- Allow respondd port on WAN to allow resolving neighbours over mesh-on-wan
  6. uci:section('firewall', 'rule', 'wan_respondd', {
  7. name = 'wan_respondd',
  8. src = 'wan',
  9. src_ip = 'fe80::/64',
  10. dest_port = '1001',
  11. proto = 'udp',
  12. target = 'ACCEPT',
  13. })
  14. -- Allow respondd-access on client_local
  15. uci:section('firewall', 'rule', 'client_respondd', {
  16. name = 'client_respondd',
  17. src = 'client_local',
  18. src_ip = 'fe80::/64',
  19. dest_port = '1001',
  20. proto = 'udp',
  21. target = 'ACCEPT',
  22. })
  23. uci:section('firewall', 'rule', 'mesh_respondd_ll', {
  24. name = 'mesh_respondd_ll',
  25. src = 'mesh',
  26. src_ip = 'fe80::/64',
  27. dest_port = '1001',
  28. proto = 'udp',
  29. target = 'ACCEPT',
  30. })
  31. uci:section('firewall', 'rule', 'mesh_respondd_siteprefix', {
  32. name = 'mesh_respondd_siteprefix',
  33. src = 'mesh',
  34. src_ip = site.prefix6(),
  35. dest_port = '1001',
  36. proto = 'udp',
  37. target = 'ACCEPT',
  38. })
  39. uci:save('firewall')