Networking Forums

Networking Forums > Computer Networking > Linux Networking > help with netcat idea - nc as a proxy (Almost)

Reply
Thread Tools Display Modes

help with netcat idea - nc as a proxy (Almost)

 
 
mrharrison@gmail.com
Guest
Posts: n/a

 
      12-15-2005, 05:02 AM
I've successfully used netcat as a proxy, such as a web proxy by
running the following:

nc -l -p 80 0<backpipe | tee -a inflow | nc 10.1.5.121 81 | tee -a
outflow 1>backpipe

where 10.1.5.121 was the web server itself (listening on port 81).
That's no problem to set up. However, what I really need to do is a
bit different (almost like a chat server, perhaps). I would like to
have netcat listen on say, ports 1111 AND 2222:

nc -l -p 1111
nc -l -p 2222

Also, no problem, but what I need to do next is connect the two
together. This is where I'm stumped. I've tried all kinds of ways to
do this. If I do something similar to the following, it does work, but
I also get a local echo on each of the client connections, which I
think is what's killing it:

nc -l -vv -p 1111 0<backpipe | tee -a inflow | tee -a outflow
1>backpipe &

nc -l -vv -p 2222 0<backpipe | tee -a inflow | tee -a outflow
1>backpipe &

I have two devices that need to connect to different ports on this
proxy and then have their streams connected together so that they can
talk. Basically, they are both behind firewalls and I cannot gain
inbound access to either one, so they must both connect to this proxy
in order to communicate. Any ideas out there?

Thanks!

Matt.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use netcat??? Kolyn_Kryw Windows Networking 1 04-11-2008 04:14 PM
Netcat broadcasting Riddic Linux Networking 1 10-17-2005 07:57 PM
Re: netcat as an http proxy server William Park Linux Networking 0 07-05-2004 08:40 PM
Netcat problem - please help Piotrek Linux Networking 4 03-03-2004 06:37 PM
netcat problem Oliver Cole Linux Networking 2 09-15-2003 11:04 PM



1 2 3 4 5 6 7 8 9 10 11