none
VB.net - How to access a computer using an open port.

    Question

  • Is there a way (Using VB.net) to access a remote computer over an open port (by defining the port - say we opened port 1234 on 192.168.1.100) and I would like to utilize that port '1234' on the remote computer 192.168.1.100 from a central computer.  The standard ports are not open on our computers, and I need to access diagnostics on the computer using an alternative port (if possible), such as statistics, and diagnostic information to monitor the systems.

    Let me know if anyone has any ideas.  Thanks, I appreciate any feed back.

    Wednesday, June 05, 2013 3:06 PM

Answers

  • On 6/5/2013 11:06 AM, PowerShellAdminTech wrote:

    Is there a way (Using VB.net) to access a remote computer over an open port (by defining the port - say we opened port 1234 on 192.168.1.100) and I would like to utilize that port '1234' on the remote computer 192.168.1.100 from a central computer.  The standard ports are not open on our computers, and I need to access diagnostics on the computer using an alternative port (if possible), such as statistics, and diagnostic information to monitor the systems.

    What do you mean by standard ports? There are two kind of ports low port numbers 0-1023 for TCP and high ports numbers 1024-66535 for TCP. Low port numbers are reserved and shouldn't be used by any program other than the program designated for the port usage, like TCP port 80 is reserved for Web applications over TCP port 80 using HTTP in communications with a Web server listening on TCP port 80.

    You can use any high port you want as long as there is no program running on the computer listening on the port. An example of this is the SQL Server Port TCP 1433 is a known port that SQL Server uses for remote communications. Therefore, if SQL Server is running on the machine, then you can't use TCP port 1433 as an example.


    Let me know if anyone has any ideas.  Thanks, I appreciate any feed back.

    http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
     Some program (a server program) that is running  on the remote computer must be listening on the port in order to do some kind of remote communications from a client program -- client/server.

    • Marked as answer by Rokitec Thursday, June 06, 2013 5:01 PM
    Wednesday, June 05, 2013 4:40 PM
  • You can't simply access a remote computer because a port is open. You need to have a two part solution in place. Part 1 being a Server/listener installed on the remote computer, Part 2 being the Client on your machine, which accesses the server software through the open port, and based on the commands sent to the server from the client, the server could then yield resources/information from that computer accordingly.

    Try searching google with the following query:

    server client example visual basic.net


    “If you want something you've never had, you need to do something you've never done.”

    Don't forget to mark helpful posts and answers ! Answer an interesting question? Write a new article about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.

    • Proposed as answer by Cor LigthertMVP Wednesday, June 05, 2013 9:55 PM
    • Marked as answer by Rokitec Thursday, June 06, 2013 5:01 PM
    Wednesday, June 05, 2013 9:10 PM
    Moderator
  • On 6/5/2013 3:34 PM, PowerShellAdminTech wrote:

    How would I go about making a server program using VB.net to listen for commands, and then have a central application that could talk out to it to grab information from remote computers?

    Do you have any good links or information on getting a project like that started with vb.net to listen on a specific port and process commands and send them back out to the central location?

    Well in a client/server or service application, it is the client program that must make the initial contact with the service/server. Just like with a Web based UI application on the Web server,  it is the browser based on a URL that makes the initial contact with the Web server and the Web application before communications between the client (the browser) and server/service are established.

    So it's the client program that is the central program that must reach out to the service program running on the machine and the client must know where the machine is located by the LAN IP the machine has and the port the service it is listening. The  client must know this information to reach out to the service running on a machine.

    What kind of commands and data are you talking about returning with data being returned to the client from a service running on the remote machine?

    • Proposed as answer by Cor LigthertMVP Wednesday, June 05, 2013 9:55 PM
    • Marked as answer by Rokitec Thursday, June 06, 2013 5:01 PM
    Wednesday, June 05, 2013 9:30 PM

All replies

  • Are you wanting to access computers networked on a LAN for this information?

    Maybe you should get this http://www.microsoft.com/en-us/download/details.aspx?id=8572

    As far as I know, although WMI is slow from what I hear, it can do what you want. I don't know why there would be a port problem.


    You've taught me everything I know but not everything you know.

    Wednesday, June 05, 2013 3:46 PM
  • On 6/5/2013 11:06 AM, PowerShellAdminTech wrote:

    Is there a way (Using VB.net) to access a remote computer over an open port (by defining the port - say we opened port 1234 on 192.168.1.100) and I would like to utilize that port '1234' on the remote computer 192.168.1.100 from a central computer.  The standard ports are not open on our computers, and I need to access diagnostics on the computer using an alternative port (if possible), such as statistics, and diagnostic information to monitor the systems.

    What do you mean by standard ports? There are two kind of ports low port numbers 0-1023 for TCP and high ports numbers 1024-66535 for TCP. Low port numbers are reserved and shouldn't be used by any program other than the program designated for the port usage, like TCP port 80 is reserved for Web applications over TCP port 80 using HTTP in communications with a Web server listening on TCP port 80.

    You can use any high port you want as long as there is no program running on the computer listening on the port. An example of this is the SQL Server Port TCP 1433 is a known port that SQL Server uses for remote communications. Therefore, if SQL Server is running on the machine, then you can't use TCP port 1433 as an example.


    Let me know if anyone has any ideas.  Thanks, I appreciate any feed back.

    http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
     Some program (a server program) that is running  on the remote computer must be listening on the port in order to do some kind of remote communications from a client program -- client/server.

    • Marked as answer by Rokitec Thursday, June 06, 2013 5:01 PM
    Wednesday, June 05, 2013 4:40 PM
  • How would I go about making a server program using VB.net to listen for commands, and then have a central application that could talk out to it to grab information from remote computers?

    Do you have any good links or information on getting a project like that started with vb.net to listen on a specific port and process commands and send them back out to the central location?

    Thanks, I appreciate the help.

    Wednesday, June 05, 2013 7:34 PM
  • You can't simply access a remote computer because a port is open. You need to have a two part solution in place. Part 1 being a Server/listener installed on the remote computer, Part 2 being the Client on your machine, which accesses the server software through the open port, and based on the commands sent to the server from the client, the server could then yield resources/information from that computer accordingly.

    Try searching google with the following query:

    server client example visual basic.net


    “If you want something you've never had, you need to do something you've never done.”

    Don't forget to mark helpful posts and answers ! Answer an interesting question? Write a new article about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.

    • Proposed as answer by Cor LigthertMVP Wednesday, June 05, 2013 9:55 PM
    • Marked as answer by Rokitec Thursday, June 06, 2013 5:01 PM
    Wednesday, June 05, 2013 9:10 PM
    Moderator
  • On 6/5/2013 3:34 PM, PowerShellAdminTech wrote:

    How would I go about making a server program using VB.net to listen for commands, and then have a central application that could talk out to it to grab information from remote computers?

    Do you have any good links or information on getting a project like that started with vb.net to listen on a specific port and process commands and send them back out to the central location?

    Well in a client/server or service application, it is the client program that must make the initial contact with the service/server. Just like with a Web based UI application on the Web server,  it is the browser based on a URL that makes the initial contact with the Web server and the Web application before communications between the client (the browser) and server/service are established.

    So it's the client program that is the central program that must reach out to the service program running on the machine and the client must know where the machine is located by the LAN IP the machine has and the port the service it is listening. The  client must know this information to reach out to the service running on a machine.

    What kind of commands and data are you talking about returning with data being returned to the client from a service running on the remote machine?

    • Proposed as answer by Cor LigthertMVP Wednesday, June 05, 2013 9:55 PM
    • Marked as answer by Rokitec Thursday, June 06, 2013 5:01 PM
    Wednesday, June 05, 2013 9:30 PM