1 ipset test test 2.0.1.0,icmp:ping
# Try to add IP address
0 ipset add test 2.0.0.1,icmp:ping timeout 3
+# Add ICMP by type/code
+0 ipset add test 2.0.0.255,icmp:3/10
+# Test ICMP by type/code
+0 ipset test test 2.0.0.255,icmp:3/10
+# Test ICMP by name
+0 ipset test test 2.0.0.255,icmp:host-prohibited
# List set
0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
192.168.68.64/27,tcp:8 timeout x
2.0.0.0/24,icmp:echo-request timeout x
2.0.0.1,icmp:echo-request timeout x
+2.0.0.255,icmp:host-prohibited timeout x
1 ipset test test 3:0:0::1,tcp:8
# Try to add IP address
0 ipset add test 3:0:0::1,tcp:8
+# Add ICMPv6 by type/code
+0 ipset add test 192:168:68::95,icmpv6:1/4
+# Test ICMPv6 by type/code
+0 ipset test test 192:168:68::95,icmpv6:1/4
+# Test ICMPv6 by name
+0 ipset test test 192:168:68::95,icmpv6:port-unreachable
# List set
0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Save set
References: 0
Members:
192:160::/27,ipv6-icmp:echo-request timeout x
+192:168:68::95,ipv6-icmp:port-unreachable timeout x
1:1:1::1,tcp:8 timeout x
2::/24,tcp:8 timeout x
3::1,tcp:8 timeout x