noddos.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. -- Copyright 2017 Steven Hessing (steven.hessing@gmail.com)
  2. -- This is free software, licensed under the GNU General Public License v3.
  3. -- /usr/lib/lua/luci/model/cbi/noddos.lua
  4. m = Map("noddos", translate("Client Firewall"),
  5. translate("Noddos controls traffic from the clients on your network to the Internet. " ..
  6. "This helps protect your network, the bandwidth on your Internet connection and " ..
  7. "the Internet"))
  8. s = m:section(TypedSection, "noddos", translate("Server Settings"))
  9. s.anonymous = true
  10. s.addremove = false
  11. s:option(Flag, "rfc1918",
  12. translate("Private networks"),
  13. translate("Report traffic to private networks (10/8, 172.16/12, 192.168/16, fd75:6b5d:352c:ed05::/64)")).default=false
  14. s:option(Flag, "upload",
  15. translate("Upload anonimized traffic stats"),
  16. translate("Uploading your statistics helps improving device recognition " ..
  17. "and discovering hacked devices & botnets"))
  18. o = s:option(DynamicList, "whitelistipv4",
  19. translate("Excluded IPv4 addresses"),
  20. translate("Don't monitor these IPv4 addresses"))
  21. o.optional = true
  22. o.placeholder = "127.0.0.1 192.168.1.1"
  23. o.delimiter = " "
  24. o.datatype="list(ip4addr)"
  25. o = s:option(DynamicList, "whitelistipv6",
  26. translate("Excluded IPv6 addresses"),
  27. translate("Don't monitor these IPv6 addresses"))
  28. o.optional = true
  29. o.delimiter = " "
  30. o.datatype="list(ip6addr)"
  31. o = s:option(DynamicList, "whitelistmac",
  32. translate("Excluded MAC addresses"),
  33. translate("Don't monitor these MAC addresses"))
  34. o.optional = true
  35. o.delimiter = " "
  36. o.datatype="list(macaddr)"
  37. return m