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.

119 lines
3.0 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. # Option for Mac address based traffic control
  47. option limit_mac_enable '0'
  48. # Options for Traffic Priority
  49. option priority_enable '0'
  50. option priority_netdev 'lan'
  51. #
  52. # For Static QoS Rate Limit Samples :
  53. #
  54. # For Download :
  55. #config download
  56. # option hostname 'My PC'
  57. # option unit 'kbytes'
  58. # option ipaddr '192.168.1.224'
  59. # option rate '128'
  60. #
  61. # For Upload :
  62. #config upload
  63. # option hostname 'office-pc'
  64. # option unit 'mbytes'
  65. # option ipaddr 'ABCD:FFED::1/64'
  66. # option rate '1024'
  67. #
  68. # For MAC address based traffic control Samples :
  69. #
  70. #config client
  71. # option drunit 'kbytes'
  72. # option urunit 'kbytes'
  73. # option hostname 'tvbox'
  74. # option macaddr '00:00:00:00:00:00'
  75. # option drate '300'
  76. # option urate '30'
  77. #
  78. # Traffic Priority Samples :
  79. #
  80. # protocol : tcp, udp, udplite, sctp, dccp, tcp is default
  81. # priority : integer between 1-11, 1 is default and the highest
  82. # service : you can input a integer or service name,
  83. # e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
  84. #
  85. #config priority
  86. # option protocol 'tcp'
  87. # option priority '-400'
  88. # option service '23'
  89. # option comment '?'
  90. #
  91. #config priority
  92. # option protocol 'udp'
  93. # option priority '-400'
  94. # option service 'https'
  95. # option comment '?'
  96. #
  97. #config priority
  98. # option protocol 'dccp'
  99. # option priority '0'
  100. # option service '22-35'
  101. # option comment '?'
  102. #
  103. #config priority
  104. # option protocol 'dccp'
  105. # option priority '300'
  106. # option service 'ftp,ssh,http'
  107. # option comment '?'
  108. #