You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2018 rosysong@rosinson.com
  3. #
  4. # This is the sample for nft-qos configuration file,
  5. # which will generate a nftables script in /tmp/qos.nft
  6. #
  7. # Getting Started
  8. # Official site :
  9. # https://netfilter.org/projects/nftables/index.html
  10. # What is nftables :
  11. # https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
  12. #
  13. # Basic Operations
  14. # Configuring Tables :
  15. # https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables
  16. # Configuring Chains :
  17. # https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains
  18. # Configuring Rules :
  19. # https://wiki.nftables.org/wiki-nftables/index.php/Simple_rule_management
  20. # Quick Reference (recommended) :
  21. # https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes
  22. # https://netfilter.org/projects/nftables/manpage.html
  23. #
  24. config default default
  25. # Enable Flag for limit rate
  26. option limit_enable '1'
  27. # Options for enable Static QoS (rate limit)
  28. option limit_type 'static'
  29. # Options for Static QoS (rate limit)
  30. option static_unit_dl 'kbytes'
  31. option static_unit_ul 'kbytes'
  32. option static_rate_dl '50'
  33. option static_rate_ul '50'
  34. # Options for enable Dynamic QoS
  35. # This option can not compatible with Static QoS
  36. # option limit_type 'dynamic'
  37. # For Dynamic QoS Samples (unit of bandwidth is Mbps):
  38. option dynamic_cidr '192.168.1.0/24'
  39. option dynamic_cidr6 'AAAA:BBBB::1/64'
  40. option dynamic_bw_up '100'
  41. option dynamic_bw_down '100'
  42. # White list for static/dynamic limit
  43. # list limit_whitelist '192.168.1.225'
  44. # list limit_whitelist '192.168.1.0/24'
  45. # list limit_whitelist 'ABCD:CDEF::1/64'
  46. # Options for Traffic Priority
  47. option priority_enable '0'
  48. option priority_netdev 'lan'
  49. #
  50. # For Static QoS Rate Limit Samples :
  51. #
  52. # For Download :
  53. #config download
  54. # option hostname 'My PC'
  55. # option unit 'kbytes'
  56. # option ipaddr '192.168.1.224'
  57. # option rate '128'
  58. #
  59. # For Upload :
  60. #config upload
  61. # option hostname 'office-pc'
  62. # option unit 'mbytes'
  63. # option ipaddr 'ABCD:FFED::1/64'
  64. # option rate '1024'
  65. #
  66. #
  67. # Traffic Priority Samples :
  68. #
  69. # protocol : tcp, udp, udplite, sctp, dccp, tcp is default
  70. # priority : integer between 1-11, 1 is default
  71. # service : you can input a integer or service name, e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
  72. #
  73. #config priority
  74. # option protocol 'tcp'
  75. # option priority '-400'
  76. # option service '23'
  77. # option comment '?'
  78. #
  79. #config priority
  80. # option protocol 'udp'
  81. # option priority '-400'
  82. # option service 'https'
  83. # option comment '?'
  84. #
  85. #config priority
  86. # option protocol 'dccp'
  87. # option priority '0'
  88. # option service '22-35'
  89. # option comment '?'
  90. #
  91. #config priority
  92. # option protocol 'dccp'
  93. # option priority '300'
  94. # option service 'ftp,ssh,http'
  95. # option comment '?'
  96. #