The UdpMatch class uses the same SourcePortCriterion and DestPortCriterion as the TcpMatch class.

UdpMatch

class UdpMatch[source]

Match against the fields of the UDP header

dest_port() DestPortCriterion[source]

Match against the destination port

source_port() SourcePortCriterion[source]

Match against the source port

to_iptables_args() List[str][source]

Returns iptables(8) arguments for this match