Python Forum
[Socket] Can a server be accessible from devices not in the same network?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Socket] Can a server be accessible from devices not in the same network?
#1
I assume that it has to do with the port and host of the Socket server, and if so, then what host and port can I choose so that devices not just in a local area are able to access the server? Thanks in advance for any help.
Reply
#2
Yes.

If host A has 192.168.0.10/24 and host B has 192.168.0.11/24 they can communicate.
The 24 is the shortcut for subnet mask: 255.255.255.0, 24 bits are set to 1, host part is 8 bit, so you've 255 - 2 hosts available in the network 192.168.0.0/24.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#3
If you have a server in a data center with a fixed ip address, your devices can connect to your server.
If you try to connect two different networks via internet, you need a tunnel/vpn.
If you try to connect two different networks without internet, you need a router, which acts as a gateway between the two networks.

You should give us more context to answer.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Paramiko Server -- Exception (server): Error reading SSH protocol banner ujlain 3 4,278 Jul-24-2023, 06:52 AM
Last Post: Gribouillis
  Socket server problem H84Gabor 0 1,207 Jun-21-2022, 12:14 AM
Last Post: H84Gabor
  Writing socket server NewPy_thwan_Programmer 0 1,916 Feb-23-2020, 03:58 PM
Last Post: NewPy_thwan_Programmer
  netmiko connecting to arista devices. dan1962 0 4,070 Feb-07-2020, 09:23 PM
Last Post: dan1962
  Server and Network (socket) [WinError 10053] Timxxx 1 4,536 Aug-23-2019, 10:03 AM
Last Post: iMuny
  Server and Network (socket) [WinError 10053] SheeppOSU 2 22,176 Apr-13-2019, 09:23 PM
Last Post: SheeppOSU
  Async socket server and ports Pengwyn 1 10,734 Feb-28-2019, 12:13 AM
Last Post: DeaD_EyE
  Multi connection socket server help! MuntyScruntfundle 0 2,685 Feb-19-2019, 12:03 PM
Last Post: MuntyScruntfundle
  Multiple network socket servers? MuntyScruntfundle 1 2,470 Nov-13-2018, 03:46 PM
Last Post: wavic
  Send data BMP180 between client and server trought module socket smalhao 0 2,805 Jul-30-2018, 12:56 PM
Last Post: smalhao

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020