Questions tagged [netcat]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
7k views

netcat not found in Amazon AMI (Centos)

I followed this guide to migrate my amazon image from one zone to another. Everything goes fine, but when i run this command: netcat -p 9999 -l >/dev/sdf It shows that the command is not found. ...
Bill Kary's user avatar
  • 201
0 votes
3 answers
2k views

shell record UDP stream from a specific address

I'm trying to record an incoming UDP stream (stream the sense that it's a stream of consecutive datagrams). I tried netcat but unfortunately multiple sources send data on the same port address and nc ...
Karoly Horvath's user avatar
1 vote
2 answers
1k views

Compress streaming data before sending

The following is working as expected. Sending server: mysqldump db_name tbl_name -d | nc -l 1234 Receiving server: nc 10.10.10.114 1234 | mysql -uroot -proot@123 test When I am dumping to remote ...
shantanuo's user avatar
  • 3,619
6 votes
1 answer
8k views

Netcat - Listen for Multiple UDP Connections

I'm trying to use netcat to debug SIP calls, which communicate over UDP. Is there a way to get the same netcat instance to listen to multiple UDP Connections? I've tried connecting to the same netcat ...
c_oreills's user avatar
2 votes
2 answers
4k views

Netcat, Syslog, UDP, and <134>

Listening with netcat on UDP 514 to syslog data I see that each sent log message is separated by <134>. Does anyone note what <134> is?
Kyle Brandt's user avatar
  • 84.3k
3 votes
1 answer
5k views

How do I test HTTP Pipelinning?

I am trying to test if site/server/whatever has ability to pipeline HTTP request. So far, I think it is possible to send several request through one curl session, like: curl http://www.example.com/...
Ency's user avatar
  • 1,241
2 votes
1 answer
7k views

Netcat / nc on ec2... public/private address?

I'm trying to use nc to debug some network issues (but am sort of ending up debugging nc itself). I have the relevant port open (to the world) in the ec2 security group. When I run either of these ...
denishaskin's user avatar
2 votes
1 answer
2k views

Can I use netcat as a lightweight web-server that will save post data as a file?

I know that netcat can be used as a lightweight web-server to host a file, but I want to also have any post data saved to a separate file. Is this possible with netcat? What's the lightest way I can ...
Steven Noble's user avatar
59 votes
3 answers
37k views

What's the difference between socat and netcat?

I understand that socat is described as a "more advanced" version of netcat, but what is the actual difference? Would it be correct to say that everything you can do in netcat you can also do in ...
bantic's user avatar
  • 1,549
1 vote
2 answers
3k views

Netcat says 'operation not permitted'

I thought I could easily copy a tgz from a linux box to a windows box (cygwin) by doing this on the linux box: nc -vv -l 4444 < file.tgz And this on the windows box: nc -vv 10.13.13.2 4444 > ...
dsummersl's user avatar
  • 206
6 votes
7 answers
5k views

How can I know if netcat & dd are working?

I'm running on server A (Source): dd bs=16M if=/dev/sda|bzip2 -c|nc serverB.example.net 19000 On server B (Destination): nc -l -p 19000|bzip2 -d|dd bs=16M of=/dev/sdb Do I need to see some ...
soulSurfer2010's user avatar
1 vote
1 answer
2k 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 ...
Registered User's user avatar
6 votes
3 answers
6k 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' ...
Harry's user avatar
  • 443
0 votes
2 answers
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 "...
user avatar
2 votes
2 answers
7k 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 ...
user avatar
76 votes
3 answers
255k views

Listen to UDP data on local port with netcat

netcat -ul -p2115 fails with a usage statement. What am I doing wrong?
Tyler's user avatar
  • 863
0 votes
3 answers
5k 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 ...
sayeed's user avatar
  • 1
0 votes
1 answer
4k 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 ( The right vpn to replace heavy ssh usage ) I have attempted to setup OpenVPN for bridging connections. I can connect ...
Sindhudweep's user avatar
0 votes
1 answer
2k 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 ...
Vasilis's user avatar
  • 293
1 vote
1 answer
4k 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 ...
qhartman's user avatar
0 votes
1 answer
562 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 "...
Igor Golodnitsky's user avatar
0 votes
1 answer
224 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 ...
Yarin's user avatar
  • 1,366
13 votes
1 answer
31k 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....
user avatar
1 vote
1 answer
6k 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 ...
djangofan's user avatar
  • 4,200
2 votes
2 answers
7k 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 ...
user avatar
3 votes
2 answers
3k 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 ...
xyz's user avatar
  • 501
5 votes
2 answers
10k 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 ...
Asad R.'s user avatar
  • 208
59 votes
4 answers
142k views

Connecting to HTTPS with netcat (nc) [closed]

I'm working on a homework assignment for my college course. The task is to fetch web pages on HTTPS using nc (netcat). To fetch a page over HTTP, I can simply do the following: cat request.txt | nc -w ...
Oto Brglez's user avatar
6 votes
4 answers
18k 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 ...
zuzur's user avatar
  • 103
1 vote
1 answer
193 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 ...
user avatar
0 votes
4 answers
729 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 ...
JayCrossler's user avatar
1 vote
3 answers
850 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; ...
Max Cantor's user avatar
5 votes
3 answers
53k 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 ...
coma's user avatar
  • 185
5 votes
6 answers
5k 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 ...
Kyle Brandt's user avatar
  • 84.3k
0 votes
2 answers
2k 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 ...
user avatar
28 votes
9 answers
33k 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?
Evgeny's user avatar
  • 599
3 votes
5 answers
2k 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 |...
Bart Silverstrim's user avatar
16 votes
9 answers
85k 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 ...
Kyle Brandt's user avatar
  • 84.3k

1 2 3
4