connecting two machines only using netcat?
i clarified my post:
i have Machine_A and Machine_B, and want to do this
`An Application Keep saying Hello to port 1209` On B : simply running
`netcat -l -p 1209 < F | netcat MACHINE_A_IP 1313 > F` on B : simply running
`telnet MACHINE_B 1313` on A : error: connection refused
i do this in test environment, live arch linux, on virtual machines, no iptables service or firewall running
A is: 192.168.1.10
B is: 192.168.1.20
virtual machines have an internal network, they can ping eachother, they can SSH to each other: which means they are connected,no network problem (i guess)
I am not sure I understand the issue. If you want to test nc then do it from command line. Then see if you can pipe it that way.
As to how to have a nc server you might look at my favorite two links.
And we may need to know the version of nc or netcat you have. Some do not act as expected. Some embedded and busybox versions are very limited.
i am also not following your scenario but i do this sometimes (maybe it will help):
i think i should apologize, i was too tired and sleepy to ask a question
i want to create a tunnel, which python scripts will use this tunnel to communicate
netcat: GNU netcat 0.7.1,
p1,p2 : py scripts , nc1,nc2 : netcat running on machine 1 and 2:
p1 <--localMachine1--> nc1 <==internet==> nc2 <--localmachine2--> p2
p1 <--> nc1 <==> nc2 <--> p2
py script will receive and send data to netcat on port 2020 on localhost
netcat will receive and send data to other netcat on remote machine on port 3030
netcat has the option L, which is for tunneling, like this:
-L, --tunnel=ADDRESS:PORT forward local port to remote address
but when i do this on machine 1, what should i do on machine 2, so that the connection is accepted?
ps: i know i can do it using ssh flawlessly, but if you could help me do it using netcat, i'll be very grateful
ps2: thanks jefro, the cheat sheet was the only good one i've seen!
@schneidz: what does that script do?
^ an example of playing a random mp3 on another computer such as a phone. i saw it as someones signature and thought it mite help in this instance.
it was so cool!
Just use the same port to receive and send, on both machines. Networking is full duplex.
netcat -l -p 2020 Remote 2020?
|All times are GMT -5. The time now is 11:39 AM.|