Traffic shaping with iptables, ipset and tc (--match-set and ...
serverfault.com › questions › 845949Apr 22, 2017 · When using sets, the set type dictates how many matching fields are used. The iptables statement specifies whether source or destination fields of the packets are used to match each field of the set. The following are a few mappings to illustrate: ipset type | iptables match-set | Packet fields ------------------+--------------------+--------------------------------- hash:net,port,net | src,dst,dst | src IP address, dst port, dst IP address hash:net,port,net | dst,src,src | dst IP address, ...
Man page of iptables-extensions - Netfilter
ipset.netfilter.org › iptables-extensionsiptables -A FORWARD -m set --match-set test src,dst will match packets, for which (if the set type is ipportmap) the source address and destination port pair can be found in the specified set. If the set type of the specified set is single dimension (for example ipmap), then the command will match packets for which the source address can be found in the specified set.