title: When I connect to vps I get an error: Connection refused
body: <p>I wrote in vps- console two files, that work great (test message comes from the client and is displayed by the server script).
  Server.py:</p>
  <pre><code>import socket
  sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, True)
  sock.bind(('localhost', 8884))
  
  while True:
      try:
          client, addr = sock.accept()
      except KeyboardInterrupt:
          sock.close()
          break
      else:
          client.setblocking(True) 
          result = client.recv(1024)
          client.close()
          print('Message', result.decode('utf-8'))
  </code></pre>
  <p>Clien.py:</p>
  <pre><code>import socket
  sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  sock.connect(('localhost', 8884))
  sock.send(b'Test message!')
  sock.close()
  </code></pre>
  <p>But if I use Client.py from <em>my home computer</em>, I get an error:</p>
  <pre><code>import socket
  sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  sock.connect(('145.148.81.8', 8884)) #ConnectionRefusedError: [Errno 111] Connection refused
  sock.send(b'Test message from my house!')
  sock.close()
  </code></pre>
  <p>How to fix?</p>