By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,587 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

P2P over internet with standard port

P: 2
Hi all,

I'd like develop a simple application in able to exchange information over internet by connecting 2 pc or smartphone or 1 pc and 1 smarphone using the standard internet ports always opened by firewall and NAT.
I tryed with sample chat application by experienced fine works only into LAN.

Can anyone helm me? or send some sample code able to work also over internet?

May 1 '14 #1
Share this Question
Share on Google+
3 Replies

P: 299
You must understand that there is much more to networking than just "default open ports" that allow devices to talk to one another over the internet. Something as simple as a firewall enabled on the end users modem could stop this traffic (and usually will). The reason is because you are trying to send what is seen as a malicious packet to a port that doesn't accept that (in this case, a port like 80 which is used for hypertext transfer protocol). That being said, I have two things to say about this:

1) If this is for you and your friends, awesome. You guys will need to port forward on your modems. This is essentially telling the modem that traffic on XX port is to be sent to your local machine which will interpret the traffic and packet. If this is what you're after, I strongly suggest opening a new question on "How to Port Forward with a Modem", and I will gladly help you.

2) Most people have no need or desire to develop an application that already exists one hundred times over unless they are being malicious or just really want to understand how it works. If it's the latter, the client application on both end points still has to open a port and communicate through a server. Achieving this with P2P on 2 separate networks can be done with the method mentioned in my #1 statement.

Hope this helps and welcome to!
May 1 '14 #2

P: 2
Hi Luk,

for better understanding there is no malicious intent.
The main task is to share data over internet from a pc/database in my office to my phone or tablet when i'm mobile. Secondary the same communication app can also decome the platform for a real time collaboration where mobile device send data to pc that store into the database.
I'll thank who can provide some code to base the platform that can work on standard port usually used for HTP traffis like 80 or similar, solving the trickly IP addressing (maybe IPv6 can be used).

May 1 '14 #3

P: 299
Here's a great write-up on creating a P2P app for local communications only.

As I stated before, networking doesn't allow P2P over the internet without the use of an agent that opens a TCP/IP port (not HTTP) nor without the use of a server to actually relay the communication between the two (since you are on a private LAN). There has to be some way for the "peers" to talk to one another outside of a private network. Those methods are via port forwarding or via a server.
May 1 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.