diff --git a/wgengine/filter/filter_test.go b/wgengine/filter/filter_test.go index 33a8d55cc..75403e461 100644 --- a/wgengine/filter/filter_test.go +++ b/wgengine/filter/filter_test.go @@ -54,6 +54,11 @@ func TestFilter(t *testing.T) { {Accept, parsed(packet.TCP, "8.2.2.2", "1.2.3.4", 0, 22)}, {Drop, parsed(packet.TCP, "8.2.2.2", "1.2.3.4", 0, 23)}, {Drop, parsed(packet.TCP, "8.3.3.3", "1.2.3.4", 0, 22)}, + // allow 8.1.1.1 => 5.6.7.8:23-24 + {Accept, parsed(packet.TCP, "8.1.1.1", "5.6.7.8", 0, 23)}, + {Accept, parsed(packet.TCP, "8.1.1.1", "5.6.7.8", 0, 24)}, + {Drop, parsed(packet.TCP, "8.1.1.3", "5.6.7.8", 0, 24)}, + {Drop, parsed(packet.TCP, "8.1.1.1", "5.6.7.8", 0, 22)}, // allow * => *:443 {Accept, parsed(packet.TCP, "17.34.51.68", "8.1.34.51", 0, 443)}, {Drop, parsed(packet.TCP, "17.34.51.68", "8.1.34.51", 0, 444)},