iptables is the Linux routing tool (i.e. firewall).
-L = list rules
-N = new target
-A = add rule
-D = delete rule
-p = protocol
-s = source
-j = target
-v = verbose
Examples:
iptables -N crazy_tcp_packets
iptables -A INPUT -j ACCEPT -i lo -s ::1 -d ::1 -p all
ip6tables -A OUTPUT -p icmpv6 -j crazy_tcp_packets
ip6tables -D OUTPUT -p icmpv6 --icmpv6-type 1 -j custom_target
Adding verbose when listing is helpful to get counts for packets hitting the rule paths.
If the IF is SNATing the outbound packet source IP to be local to the machine, but you need the source IP to be an external source (such as in a bridging scenario) try iptables -t nat -F since a standard flush does the filter table and not the NAT.