Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol.

learn more… | top users | synonyms

1
vote
1answer
1k views

ssh use with netcat to forward connections via bastion host to inside machine

I am having a server in a corporate data centre who's sys admin is me. There are some virtual machines running on it.The main server is accessible from internet via SSH. There are some people who ...
3
votes
2answers
2k views

netcat -e: the GAPING_SECURITY_HOLE

Why does the BSD version 1.10 of nc disable the -e option found in other, so-called insecure distributions when the same dangerous feature could be trivially achieved as follows even with the 'secure' ...
1
vote
2answers
1k views

Having trouble with SSH remote port forwarding [closed]

all. My college network somehow disallows incoming connections. (I can SSH out of the network, but not into it.) I'm trying to set up an SSH tunnel from my school computer ("school") to a VPS "...
0
votes
2answers
4k views

Measuring network throughput with netcat vs. CIFS/SMB transfer rates

I have been attempting to measure and benchmark our LAN's throughput as part of a larger project. Our LAN is constructed using cat5e and HP ProCurve 1800-24G switches which support 10/100/1000 Mbps ...
17
votes
2answers
40k views

listen to UDP data on local port with netcat

netcat -ul -p2115 fails with a usage statement. What am I doing wrong? Thanks!
0
votes
3answers
4k views

Run netcat in background on Ubuntu Lucid 10.04

I am trying to do a pg_dump from one server and simultaneously restore at the other server. The command on source server (192.168.3.94): pg_dumpall -v | nc 192.168.3.95 4000 The command on the ...
0
votes
1answer
3k views

How to diagnose / fix an OpenVPN setup which works from inside of LAN but doesn not work from WAN side of router

The firm I work for has decided to go with OpenVPN to replace heavy ssh usage ( http://serverfault.com/questions/80566/the-right-vpn-to-replace-heavy-ssh-usage ) I have attempted to setup OpenVPN for ...
0
votes
1answer
922 views

Different behaviour of netcat from telnet when connecting to public route server

I have observed a different behaviour between netcat and telnet when connecting to the public route server bgp-view.tvnetwork.hu and issuing the command show ip bgp. Using Telnet the output (which is ...
1
vote
1answer
2k views

redirecting output from telnet / nc to file in script fails when cron'd

So, I have device on my network which sits there listening on a port for a connection, and when a connection is made it dumps ascii data out. I need to capture that data to a file. I wrote a dead ...
0
votes
1answer
381 views

Localhost service accessible from remote address

I have on my home Windows box - Cassini server with localhost:10000. And I want it be accessible in internet by my static IP. Tried netcat, "nc -l -p 10001 localhost 10000". But it results in "...
0
votes
1answer
189 views

Logging network activity of LAMP server using BASH

I've got a Fedora LAMP server on Amazon EC2 functioning as a HTTP pseudo-proxy (Sorry, don't know the terminology- It's not a true proxy where requests are relayed through apache, rather client ...
8
votes
1answer
14k views

How to get a udp response with netcat

I am trying to do something like: echo "request" | nc -u 1.1.1.1 9999 > response.txt I can see that response is coming from server (with tcpdump) after executing this line. However, my response....
1
vote
1answer
3k views

Is it possible to make a web browser proxy tunnel with Netcat/Socat?

Concerning the Netcat/Socat utility . From the man page, it seems like it is possible to create a secure proxy using netcat by which I could point my web browser to like a proxy server , that could ...
1
vote
2answers
2k views

How do I get netcat to accept connections from outside the LAN?

I'm using netcat as a backend to shovel data back and forth for a program I'm making. I tested my program on the local network, and once it worked I thought it would be a matter of simply forwarding a ...
2
votes
2answers
2k views

“netcat -e” / “nc -e” on Mac OS X

netcat [...] -e program nc [...] -e program Is supposed to run program as a server (as far as its stdin and stdout are concerned). netcat on Mac OS X does not seem to have this -e option. Why is ...
3
votes
2answers
4k views

Getting a TTY in a Connectback Shell

I'm often asked by friends to help with small Linux problems, and more often than not I'm required to login to the remote system. Usually there are a lot of issues with making an account and logging ...
13
votes
4answers
24k views

Connecting to HTTPS with netcat (nc) [closed]

I'm working on homework assignment for my college. Task is to fetch web page on HTTPS using nc (netcat). To fetch a page over HTTP, I do this: cat request.txt | nc -w 5 <someserver> 80 In ...
4
votes
3answers
6k views

Netcat command line issues

I am trying to collect statistics from a memcached server using netcat. ~ $nc 10.251.170.80 11211 stats STAT pid 27508 STAT uptime 7940345 STAT time 1262949310 STAT version 1.2.4 STAT pointer_size ...
1
vote
1answer
171 views

My sysadmin is on vacation, Help!

I wanted to trouble shoot a certain issue on the server, but I could not connect my debugger since the person who maintains the firewall is off on a vacation. I dont want to mess with his settings. He ...
0
votes
4answers
441 views

Packet Crafting on a Mac

I think (based on searching the forums), that NetCat is the best option, but wanted to hear if others are preferable. Anyone have good success with a packet-crafting tool (specifically on Mac)? I've ...
1
vote
3answers
612 views

Synchronous serving with netcat

This command will persistently serve its output--all hits from today on an apache server--to a browser, via netcat: while true; do grep `date +%d\\/%b` /var/log/apache/access.log | nc -q1 -l -p8080; ...
1
vote
3answers
6k views

Netcat “Connection refused” on localhost

I am trying to get a value from a netcat connection started at a php file, but it dies with: localhost [127.0.0.1] 2000 (?) : Connection refused I don't know why, but it works well if I ssh it as ...
3
votes
6answers
2k views

TCP Sessions and IP Changes

What happens to a TCP session when the IP of a client changes? I did a simple test of having netcat listen on a port, and connecting to that port from a client machine. I then changed the IP of ...
0
votes
2answers
1k views

SSH and port forward socks proxy

I would like to setup an ssh tunnel that includes 3 machines. One machine I want to make http requests from but can only connect to a central server and outbound port 80 requests. The server is a ...
20
votes
9answers
17k views

How to set up disk cloning with dd, netcat and ssh tunnel?

I would like to copy stuff in bulk (reimage disk using dd) with netcat from host A to B via ssh encrypted channel on Linux. What commands should I type on both ends?
3
votes
5answers
877 views

Network performance in large transfer of data

I'm using DD over Netcat to copy a hard disk from one system to another, straight clone. I booted RIP on each system. target system: nc -l -p 9000 |pv|dd of=/dev/hda source system: dd if=/dev/hda |...
12
votes
8answers
43k views

Send an email with an attached file using telnet or netcat

I often use telnet or netcat to connect smtp servers to send an email as a test. Does anyone know how you would send an email using telnet or netcat but attach a file as well? There are probably ...