title: How to detect Point to Point VPN when peers are my softwares
body: <p>I am trying to develop a utility, that runs on two peers in a network. The job is to identify if the network is actually a VPN. An important property to be noted is - the peers mostly belong to different networks in different offices in different geographies. One important property of this setup is the peers are assumed to be in same subnet. If they are not, communication is not allowed.</p>
  
  <p>The peers connect to each other using a TCP connection. After establishing connection peers exchange connected IP Addresses of both machines. Then the two software pieces compare the network part of it(they get the net mask from adapter), with that of itself. If the two networks do not match, it is declared as VPN.</p>
  
  <p>However, this mechanism cannot be used in point to point VPNs.</p>
  
  <pre><code>I check if the adapter is a software adapter.
  I could also exchange public IPs to know if our public IPs are different.
  I could exchange MAC addresses/description of the connected adapters and compare them.
  </code></pre>
  
  <p>But to me all this seems to be symptomatic tests and not a definitive test.</p>
  
  <p>Need ideas.</p>