I get an error saying that the connection was rejected by the target machine here, suggesting that my firewall is working well

How do I make sure that the connection is accepted? It's a chat program (obviously) so I'm going to need to do the same thing on users' computers when it is installed. How do I make this in such a way that the connection will be accepted but leaving security uncomprimised?
vb.net Code:
  1. Imports System.Net.Sockets
  2. Public Class QuickChat
  3.     'Dim invited As List(Of String) = New List(Of String) 'ip addresses
  4.     Dim ip(3) As Byte
  5.     Dim conn As NetworkStream
  6.     'Dim s As Socket
  7.     Dim tcpclient As TcpClient
  8.     'Dim tcplistener As TcpListener
  9.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  10.         'Set up form
  11.         Dim si As Size = Screen.GetWorkingArea(New Point(1, 1)).Size
  12.         Me.MaximumSize = New Size(si.Width \ 3, si.Height)
  13.         Me.Width = Me.MaximumSize.Width
  14.         'Retrieve chat IP.
  15.         Dim ipre As New System.Text.RegularExpressions.Regex("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")
  16.         Dim cip As String = InputBox("Please enter the IP address of the person that you would like to send to.", "Enter IP Address", "0.0.0.0")
  17.         If Not ipre.IsMatch(cip) Then
  18.             Me.Close()
  19.             Exit Sub
  20.         End If
  21.         Dim ipbs() As String = cip.Split(".")
  22.         ip(0) = CByte(ipbs(0))
  23.         ip(1) = CByte(ipbs(1))
  24.         ip(2) = CByte(ipbs(2))
  25.         ip(3) = CByte(ipbs(3))
  26.         'Set up send/recieve
  27.         tcpclient = New TcpClient()
  28.         tcpclient.Connect(New Net.IPAddress(ip), 120)
  29.         conn = tcpclient.GetStream()
  30.         Me.tmrCheckForMessage.Start()
  31.     End Sub
  32.  
  33.     Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
  34.         SendMsg(Me.txtNewMessage.Text)
  35.     End Sub
  36.     Private Sub SendMsg(ByVal msg As String)
  37.         Dim c As Char
  38.         For Each c In msg
  39.             conn.WriteByte(AscW(c))
  40.         Next
  41.         conn.WriteByte(0)
  42.     End Sub
  43.     Private Function GetMsgIfAny() As String
  44.         Dim b As Byte = conn.ReadByte()
  45.         Dim str As String = ""
  46.         While b > 0
  47.             str &= ChrW(b)
  48.             b = conn.ReadByte()
  49.         End While
  50.         Return str
  51.     End Function
  52.  
  53.     Private Sub tmrCheckForMessage_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrCheckForMessage.Tick
  54.         Dim s As String = GetMsgIfAny()
  55.         If s = "" Then Exit Sub
  56.         Me.txtChatLog.Text &= String.Format("{0}{1}{0}{0}", ControlChars.CrLf, s)
  57.     End Sub
  58. End Class