How to connect two devices behind router [closed] - sockets

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Device A -> Router -- Internet -- Router <- Device B
I know VoIP normally direct connect two device. But I don't know how they get connected. I assume there's a server on internet.
For others have questions like me:
http://en.wikipedia.org/wiki/NAT_traversal

If the two routers are doing NAT, then yes, probably there is a server in the middle. So, each device only has to make a connection OUT through the router, which is no problem. Then the server can pass data back and forth between them.
But it is also possible to make a connection directly, even if both routers are doing NAT. In order for this to work, at least one router needs to have a port forwarding configuration set up, to allow an inbound TCP connection from the other to be forwarded to the correct device, on some specific port. This port forwarding could be manually configured on the router or it could (depending on the router) be set up automatically by the device, using UPnP protocol (if the router supports it).
Even then, usually there's a server in the middle that both devices might communicate with to find out the IP and port number used by the other device. But if you have other ways of knowing this information, it's not necessary.
Hope this helps.

I assume since you mention VOIP you are wondering how two IP Phones connect?
Phone is configured with the IP address of a PBX. Phone 1 makes a call. The digits are sent to the PBX. The PBX examines the phone number dialed and looks up the phone number in something called a dial plan. That dial plan tells the PBX the path to get to the phone number dialed. It may say open a connection to the phone company or it might tell the PBX the IP address of the other PBX.
If it gets the IP address of another PBX it sends a SIP message to the remote PBX informing that it has a incoming call. The remote PBX accepts the SIP message and sets up the call and tells the remote phone to ring. When the phone is answered the two IP PBX's agree that the call is set up and tells each phone the ip address of the other phone and allows them to communicate directly.

Related

How to connect two laptops through USB? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'd like to connect multiple laptops through a wire such as USB.
For example one of laptops is host and the others are going to be client.
The client server will send a data buffer, and the host server will listen client's data streaming. It will be kind of simple web server and client one.
However in this case, in order to use even unstable Wi-fi environment, they will be connected through USB(It can be different one, but it is not ethernet port. this is because some laptop might not have ethernet port.)
I'm going to use make their connection by node js. do you have any good idea about good way to connect them?
USB is designed to be used in host / device situations, where the host is something with an operating system, and the device is a small cheap low compute power item. It is not designed for direct host to host connections and does not support it.
You could use a USB to rs232 adapter on each computer, and connect the adapters with a null modem cable. Or you could get USB to ethernet adapters.
If you want multiple host devices to talk to each other, you want a network wire, like ethernet, which was designed for this specific purpose.
Many systems have ethernet ports built in, and USB to ethernet adapters are cheaper and higher bandwidth than just about any other USB host to host communications adapter.

VPN instead of port forwarding? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
At start I need to mention that I'm a complete newbie if we talk about networking, so don't judge me ;)
Problem:
I've got a Flask application running on my raspberry pi. I can access it via web browser using raspberry_ip:5000. I need to access this app outside of my local network.
I used to have port forwarding on my router so whenever I typed in browser my_public_ip:5000 I could use my app running in local network. However as many people say, port forwarding isn't the best and most secure method.
And here is my question: Can I access app on my raspberry using VPN (Private network where is only raspberry, and there is not risk of some kind of attack), becasue I guess it would be much more secure than port forwarding.
Maybe there is some other method to access this flask app outside of my network, without risking an unathorized access to local network.
sorry for my poor english
As long as the following are set, this solution sounds fine to me.
Your Flask application is secured by user authentication.
The Web communication is secured by an SSL certificate(using server HTTPS).
In order to be more secure, I would put a Web server in front of Flask, such as Nginx, therefore you are exposing the Nginx process to the Internet rather than Flask.

Does ethernet communication need internet connection? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
For an ethernet connection between 2 points which will be used as point to point communication (for embedded devices). Is internet connection, hubs or switches are really necessary? Or can we still send and receive data from one MCU to another one by using ethernet without using any internet connection, hubs or switches?
There's certainly no need for an Internet connection.
If you want to connect two computers together directly, then you will need to use a crossover cable rather than a patch cable unless the devices you are using support auto MDI-X.
Putting a cheap hub between them will probably be simpler.
No, they are not necessary. We ofen do this between either two of "product board", "FPGA board", and "PC" when debugging ethernet Tx/Rx issues.

Is it possible to share IP on server among multiple applications?

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 hours ago.
Improve this question
Have you heard about Russia blocking IPs of Amazon’s servers (millions of them) in order to block messenger Telegram? There are a lot of cases when people are saying that their unrelated to Telegram applications, but located on Amazon servers, laid down as well as a consequence.
I was wondering if this teqnically possible situation. If I, for example, use Amazon’s server for my app, do I share an IP with others? Does it mean that if somebody blocks this IP to block another app, then I screw up as well? Or these are all fake sayings, and block is targeted enough to avoid this?
Is it possible to share IP on server among multiple applications?
Definitely. This is why transport protocols like TCP and UDP use port numbers. These port numbers serve as sub-addresses for the IP.
Some application protocols can even share the same IP address and port combination, like HTTP. An HTTP vhost (or a proxy) can direct the request to the desired server instance depending on the URL parameters.
So, when Internet censorship is applied on the IP address basis, it's not uncommon to filter more than intended.

How many people can connect to one port? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Hi this will be an easy question.
Ftp, as an example, works on ports 20, 21. How many different people can connect to the same ftp server on the same port (21) at the same time?
As many as the server and the server OS can handle. There is no specific limit.
All the comments citing specific clients are incorrect, as is the one stating '1-8 as far as I know.' The comment about 'FTP Site Default settings' only applies to Microsoft IIS.
Port is the virtual interfacing used to differentiate services. In your case FTP server listen on particular port 21 which differentiate all other services/servers running on the same system listening to the same IP address (eg: DHCP server on 67 etc.,).
So the port are used only at Transport and Application layer (to bind to the particular port). The number of connections is limited with the help of "listen" system call (in case of linux), which will used in server binding.
Note: Observe any PCAP traces and socket programming to understand the usage of port.