You need to appropriately group your final conditions. Right now, the last "or" ignores all of the source_ip
conditions.
Structure the query as such:
select source_ip, destination_ip
from ip_table
where
(
inet '10/8' >> source_ip
or inet '192.168/16' >> source_ip
or inet '172.16/12' >> source_ip
)
and (
inet '10/8' >> destination_ip
or inet '192.168/16' >> destination_ip
or inet '172.16/12' >> destination_ip
);
Note the destination clause is grouped together.