title: How to connect two computers using python socket without local connection
body: <p>Im using python socket to connect two computers,</p>
  <p>it completely works when both systems are connected to one mobile hotspots or LAN,
  But when i use two diffrent hotspots or try to connect to my friend's PC, it stops working and client cant find server.</p>
  <p>(I find my IP using &quot;ipconfig&quot; command on cmd from &quot;Wireless LAN adapter Wi-Fi: IPV4 Adress&quot;)
  here are my codes for checking the connection:</p>
  <pre><code>#SERVER
  
  import socket
  s = socket.socket()
  IP, port= MY IP, 8002
  s.bind((IP,port))
  while 1:
      s.listen(1)
      a,b=s.accept()
      print(a,b)
      print(&quot;client tried to connect&quot;)
  </code></pre>
  <pre><code>#Client
  import socket
  s=socket.socket()
  IP,port=SERVERS IP, 8002
  s.connect((IP,port))
  </code></pre>
  <p>Can you guys help me please?</p>