Db unwanted connection on different pc's

Hi, I have two PCs (ubuntu) with MongoDB instances running on them.
Each PC has two Ethernet adapters with static IP addresses:

  • eth0:
  • eth1: 20.20.18.x , where x is uniuqe for each pc.
    the PCs are wired connected on eth1, which is disable by default.
    When both PCs enable the eth01 adapters I’m experiencing issues with the MongoDB instances on both PCs reading each other.
    The config has:
    port: 27017
  1. how is it possible?
  2. how to prevent it?
    thanks, Yair.