2 # Copyright (C) 2018 rosysong@rosinson.com
4 # This is the sample for nft-qos configuration file,
5 # which will generate a nftables script in /tmp/qos.nft
10 # https://netfilter.org/projects/nftables/index.html
12 # https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
16 # Configuring Tables :
17 # https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables
18 # Configuring Chains :
19 # https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains
21 # https://wiki.nftables.org/wiki-nftables/index.php/Simple_rule_management
22 # Quick Reference (recommended) :
23 # https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes
24 # https://netfilter.org/projects/nftables/manpage.html
27 config default default
28 # Enable Flag for limit rate
29 option limit_enable '1'
31 # Options for enable Static QoS (rate limit)
32 option limit_type 'static'
33 # Options for Static QoS (rate limit)
34 option static_unit_dl 'kbytes'
35 option static_unit_ul 'kbytes'
36 option static_rate_dl '50'
37 option static_rate_ul '50'
39 # Options for enable Dynamic QoS
40 # This option can not compatible with Static QoS
41 # option limit_type 'dynamic'
43 # For Dynamic QoS Samples (unit of bandwidth is Mbps):
44 option dynamic_cidr '192.168.1.0/24'
45 option dynamic_cidr6 'AAAA:BBBB::1/64'
46 option dynamic_bw_up '100'
47 option dynamic_bw_down '100'
49 # White list for static/dynamic limit
50 # list limit_whitelist '192.168.1.225'
51 # list limit_whitelist '192.168.1.0/24'
52 # list limit_whitelist 'ABCD:CDEF::1/64'
54 # Options for Traffic Priority
55 option priority_enable '0'
56 option priority_netdev 'lan'
60 # For Static QoS Rate Limit Samples :
64 # option hostname 'My PC'
65 # option unit 'kbytes'
66 # option ipaddr '192.168.1.224'
71 # option hostname 'office-pc'
72 # option unit 'mbytes'
73 # option ipaddr 'ABCD:FFED::1/64'
77 # Traffic Priority Samples :
79 # protocol : tcp, udp, udplite, sctp, dccp, tcp is default
80 # priority : integer between 1-11, 1 is default and the highest
81 # service : you can input a integer or service name,
82 # e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
85 # option protocol 'tcp'
86 # option priority '-400'
91 # option protocol 'udp'
92 # option priority '-400'
93 # option service 'https'
97 # option protocol 'dccp'
99 # option service '22-35'
103 # option protocol 'dccp'
104 # option priority '300'
105 # option service 'ftp,ssh,http'