Click here to Skip to main content
11,649,406 members (81,977 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET TcpClient
I am a bit confused now. I am creating a TCP Chat App (Client-Server) and my questions is im behind a router, im the server. D
Do i also have to port-forward the TCP Port to my local computer, like the Client has to do or do i have not because im the server and the server basically waits in idle for a connection from client side?
Posted 5-Nov-12 11:38am
bEGI232.9K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You may need to. If you are using a local IP address of 127.0.0.1 then no any router connected to your network will be able to connect but if you are using a private ip address such as 192.168.1.678 then nobody will be able to connect. You need to find your public IP address. https://www.google.com/search?q=whats+my+public+ip+address&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#hl=en&client=firefox-a&hs=8jV&tbo=d&rls=org.mozilla:en-US:official&spell=1&q=what%27s+my+public+ip+address&sa=X&ei=GGmZUL-IIoTH0QGdloHACg&ved=0CC0QBSgA&bav=on.2,or.r_gc.r_pw.r_qf.&fp=6badbe56f25053ec&bpcl=37189454&biw=1680&bih=957[^]
Click that link to get your public ip address. Once your public IP address is found then you need to unblock the port that you are sending and recieving tcp data with.

WARNING: DO NOT ENTER DMZPLUS MODE IF YOU ARE ON AN AT&T ROUTER. YOU WILL GET HACKED WITHIN A WEEK BECAUSE IT WILL ACCEPT ANY DATA FROM ANY PORT.

Their you go hope you continue to program you TCP/IP CHAT application Smile | :)
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I already know how to obtain my IP programmatically but i found out that only the server needs port-forwarding, the client does not have to port-forward since he searches for connection, thanks ExcellentProducts for the tips
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 F-ES Sitecore 354
1 OriginalGriff 324
2 Kornfeld Eliyahu Peter 309
3 CPallini 295
4 Sergey Alexandrovich Kryukov 254
0 OriginalGriff 1,577
1 Sergey Alexandrovich Kryukov 1,087
2 CPallini 1,015
3 DamithSL 996
4 jyo.net 994


Advertise | Privacy | Mobile
Web04 | 2.8.150804.4 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100