Find strings where the first half matches the second

One option:

library(stringr)
split_function = function(x) {
    x = sort(x)
    paste(x, collapse="::")
}

pairs = str_split(ip_pairs, "::")

unique(sapply(pairs, split_function))
[1] "104.124.199.136::192.168.1.67"    "104.124.199.136::192.168.137.174"