Announcement

Collapse
No announcement yet.

Manual Port Control / Win2K/XP Server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Manual Port Control / Win2K/XP Server

    Greetings all;

    First time post from me, just a quick question though, shouldn't be too difficult.

    Is there a method to manually control the open/closed/listen state on network "ports". My preference is thru a command line interface, but would be open to a software/code solution.

    -- o 0 ) n e u r o c o n ( 0 o --

  • #2
    regarding windows 2k/xp these ports rely on the service running... if the service isn't running the port isn't open.

    using the command line you can use the net start SERVICENAME, net pause SERVICENAME, net stop SERVICENAME command to start, pause, stop the service respectively.

    example:
    C:\>net stop "World Wide Web Publishing Service"
    The World Wide Web Publishing Service service is stopping...
    The World Wide Web Publishing Service service was stopped successfully.


    C:\>net start "World Wide Web Publishing Service"
    The World Wide Web Publishing Service service is starting.
    The World Wide Web Publishing Service service was started successfully.

    to get a list of services that are running/started just type in:
    net start

    Comment


    • #3
      Thanks for the fast reponse Blackwave

      So the only way to open a port is to have a service (IIS/FTP/SQL etc.) using/relying on it?

      -- o 0 ) n e u r o c o n ( 0 o --

      Comment


      • #4
        Originally posted by Neurocon
        So the only way to open a port is to have a service (IIS/FTP/SQL etc.) using/relying on it?
        You can open a port with any program that handles winsock...

        example:
        telnet 127.0.0.1 21
        telnet localhost 21
        telnet 127.0.0.1 25
        telnet localhost 25

        what is it that you are trying to do?

        Comment


        • #5
          I am actually working with the Net API on a project and trying to understand a little more about port manipulation. I don't really care about managing port 80 for IIS, or anything specific; I just want to use specific ports in this service and was wondering if there is a way to just "open" any random (not in use) port and have it listen.

          Kind of an off the wall question, I know, just figured I'd throw it out as a good "first post" kinda thing, and see where it went.



          -- o ) Neurocon

          Comment


          • #6
            Originally posted by Neurocon
            I just want to use specific ports in this service and was wondering if there is a way to just "open" any random (not in use) port and have it listen.
            Yes you can, even when they are in use. Check out one of my favorite programs that I use when wanting to do something similar here:( VC++ project ): http://www.packetfactory.net/projects/ngrep/

            Comment


            • #7
              Awesome... Thanks so much Blackwave. Hope to see you at DCXI!

              --o0 ) n e u r o c o n ( 0o--

              Comment


              • #8
                Originally posted by Neurocon
                Awesome... Thanks so much Blackwave. Hope to see you at DCXI!
                You are more than welcome, and you won't be able to miss me :)

                Comment


                • #9
                  Originally posted by blackwave
                  You are more than welcome, and you won't be able to miss me :)
                  He will be the cute guy bent over my lap. WhACK!!!! WHACK!!!!!!!!

                  In addition commonly most services are associated with ports and can be locked down by disabling different services. To lock down services do this:

                  1. Start ---> Run ---> type MMC
                  2. CLick on console
                  3. Click Add/Remove Snap-in
                  4. Click Add
                  5. Select "Services"
                  6. Click OK , Click ok
                  7. Expand the Services snap in
                  8. select the service and right click
                  9. In the mid drop down box select disable, manual, automatic, etc.

                  I prefer this to netstart because it gives me a scrollable view of started services.

                  Last edited by pezz; April 9, 2003, 13:42.

                  Comment


                  • #10
                    Ha Ha ... And I'll be sure that a picture of that makes its way right back here to the forum.

                    Comment


                    • #11
                      Originally posted by pezz
                      1. Start ---> Run ---> type MMC
                      mmm... MMC is soooo juicy :D ... some people just don't get it...

                      Comment


                      • #12
                        anything to be lite on the carpal tunnel

                        Comment


                        • #13
                          Crap... I didn't even see the ellaborate steps thru of mmc snapin control. . . . Thanks Pezz. I agree though, the command prompt and the Net command can do amazing things. My favorite too for most things.

                          Thanks again Pezz.

                          Comment


                          • #14
                            Originally posted by pezz

                            1. Start ---> Run ---> type MMC
                            Wow, I had forgotten about MMC. Its like finding money in a coat pocket. Cool!

                            Comment


                            • #15
                              You might also appreciate the pre-built mmc available in 2k & XP.

                              I)Right click "My Computer"
                              II)Select "MANAGE"

                              Save some time when working on systems where you don't have a custom MMC interface saved to.

                              ;)

                              Comment

                              Working...
                              X