title: Python- can't connect to my IP
body: <p>I started learning about computer networks and I tried using sockets in Python.
  With a little help from a youtube video, I made a very simple Chatting program between a Server and a Client.
  When I tried to connect the client with 'localhost', it worked just the way I wanted. But when I tried using the IP address (that I found on findmyip.org, for example lets say 12.123.12.123), It just didn't show any sign of a connection.
  The Server is:</p>
  
  <pre><code>import socket
  import sys
  
  def socket_create():
      try:
          global host
          global port
          global s
          host = ''
          port = 9998
          s = socket.socket()
      except socket.error as msg:
          print "socket creation error bluhbluh"
      print "socket created"
  
  def socket_bind():
      try:
          global host
          global port
          global s
          print "Binding socket to port"
          s.bind((host,port))
          s.listen(5)
      except socket.error as msk:
          print "socket binding error"
          socket_bind()
  
  
  def socket_accept():
      conn,address = s.accept()
      print "connection has been established"
      print address[0]
      send_msg(conn)
      conn.close()
  
  def send_msg(conn):
      while 1:
          mess=raw_input()
          if mess == "quit":
              conn.send(mess)
              conn.close()
              s.close()
              sys.exit()
          if len(mess)&gt;0:
              conn.send(mess)
              resp=conn.recv(1024)
              print resp
  
  def main():
      socket_create()
      socket_bind()
      socket_accept()
  
  main()
  </code></pre>
  
  <p>The Client is:</p>
  
  <pre><code>import socket
  import os
  import sys
  
  s = socket.socket()
  host = '12.123.12.123' #replace with 'localhost' for a working version! :D 
  port = 9998
  s.connect((host,port))
  
  while 1:
      data = s.recv(1024)
      print data
      if data=="quit":
          s.close()
      else:
          mess=raw_input()
          s.send(mess)
  </code></pre>
  
  <p>I Had this problem before, and from what I can remember, I didn't manage to fix it then aswell..
  I tried port forwarding (at least I THINK I did it right)
  I hope you could help me
  Thank you in advance :)</p>