-
March 23rd, 2004, 08:44 PM
#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.
-
March 23rd, 2004, 09:03 PM
#2
Member
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
-
March 23rd, 2004, 09:07 PM
#3
Senior Member
2nd try:
how did you start nc on the listening machines?
-
March 24th, 2004, 12:21 PM
#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
-
March 24th, 2004, 12:59 PM
#5
Senior Member
why are you using -l and -L ?
maybe ter will be some output on the listening machine ...
so don't -d ... but -v -v
-
March 24th, 2004, 04:07 PM
#6
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.
-
March 25th, 2004, 02:42 PM
#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...
-
March 25th, 2004, 02:50 PM
#8
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.
-
March 29th, 2004, 09:15 AM
#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!
-
March 31st, 2004, 09:36 PM
#10
Member
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
-
Forum Rules
|
|