connecting to another computer using netcat
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: connecting to another computer using netcat

  1. #1

    connecting to another computer using netcat

    hi all,

    i've got a problem connecting to another computer using netcat:

    there are 2 boxes on my lan (besides this one), and i can access both with the command:
    nc 192.168.1.111 1500 & nc 192.168.1.112 1500

    the problem is that i've both set it up so that i get a command prompt when i connect to port 1500.

    but when i connect to system A first and get a command prompt there, i can't connect to system B from system A so it would be like this: my box --> A --> B
    but this doens't work, the command prompt hangs when i do this.


    any suggestions?

    b.t.w. i can access system B directly but not via A or vica versa.

  2. #2
    Member
    Join Date
    Jan 2003
    Posts
    47
    what os's are we talking about here i found that nc dosent work as well on Win 9* So the problem might be that your jumping from an xp box to a 95 to a xp/9* box i dont know just an idea but if you could tell me the os's that would be very helpful

  3. #3
    Senior Member
    Join Date
    Aug 2003
    Posts
    185
    2nd try:

    how did you start nc on the listening machines?
    Industry Kills Music.

  4. #4
    ok, all three machines are w2k, i've forgotten to mention that


    i started nc with : nc -L -l -d -t -p 1500 -e cmd.exe

  5. #5
    Senior Member
    Join Date
    Aug 2003
    Posts
    185
    why are you using -l and -L ?
    maybe ter will be some output on the listening machine ...
    so don't -d ... but -v -v
    Industry Kills Music.

  6. #6
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    On any *nix system this should work, windows on the other hand....
    I know the shell in windows is quite cripple compared to a *nix shell. There are some differences in the way input/output redirection work. This could be the reason it doesn't work.
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  7. #7
    i'll give it a try with the -v -v options and without the -d, but i was thinking:
    perhaps it is because i use the same port:

    my system --> system A:1500 --> system B:1500, maybe this is the problem, that system A can't have a connection to my computer and at the same time make a connection via the same port with system B, i'll go and check this out too, and let you guys know...

    as for windows vs linux, i'll have to agree that linux shell has much more power, but in this case the systems run on w2k, so i haven't got any other choice...

  8. #8
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    perhaps it is because i use the same port:
    Yeah. that's exactly it. Set each one to a different port
    and you are good to go.
    I came in to the world with nothing. I still have most of it.

  9. #9
    ok thanks rcgreen, haven't had the time yet, also been without internet at home for about a month now, so when it is all cleared up and running again i'll give it a try!

  10. #10
    rcgreen is going in the right direction. you would have to use different ports for each system.

    nc <ip for computer a> 1500 on "your machine" will connect to computer A
    then run
    nc <ip for computer b> 1501 (or some other port) to connect to computer B

    just be sure to have computer B listen to port 1501, not 1500

    Also, leaving netcat listening without restriction can pose a HUGE security risk.
    so, only execute the listening command when you will connect within a short period of time
    You are so bored that you are reading my signature?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides