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

learn more… | top users | synonyms

2
votes
0answers
20 views

IP Forwarding Configurations [closed]

I am testing ip forwarding to recieve external connections from my computer at home. I did the following from my router settings: Turned off firewall of router and fedora, done forwarding settings, ...
0
votes
1answer
24 views

Pipe directly to Logstash?

I would like my log data for servers such as Nginx to go directly to Logstash over a network. Logstash has TCP and UDP socket handlers built-in that would be perfect for receiving the data, but ...
0
votes
0answers
24 views

network throughput test: iperf vs netcat

I'm trying to measure the throughput of a 10 Gbit/s network. With iperf test I'm reaching about 9,3 gbits/s. However when I'm trying to copy some data with netcat, I'm getting just about 1,8 gbits/s. ...
0
votes
1answer
48 views

2012R2 Hyper-v host CentOS7 guest slow network speed over external network

I have a Hyper-V host on win2012R2 (Version 6.3.9600) with two gigabit network adapters, one of them connecting to a gigabit router (the another one is currently out of use because lack of a gigabit ...
0
votes
1answer
35 views

Sending file with netcat over UDP: Unusual Wireshark output

For the purposes of demonstrating differences between TCP and UDP, I'm piping the contents of a file across a network connection, and recording the interaction with Wireshark. Everything looks normal ...
1
vote
0answers
26 views

How to get the serial console logs via ethernet port? [closed]

I have a board running Busybox linux and for my debugging activities I always have to connect physically to the serial port to get the serial console prints and logs.I believe using netcat tool we ...
2
votes
1answer
37 views

Clarification of netcat result

I've been trying to debug an issue on our servers and Im confused by this response from netcat. Can anyone explain why Im getting these 2 contradictory messages when checking to see if a port is ...
1
vote
0answers
35 views

Investigating connectivity issue

I'm trying to set a up a new service on a server that is running apache, however it seems like incoming traffic on that specific port is blocked, although I do not understand why. On the first server, ...
0
votes
2answers
75 views

Running ssh/netcat in the background

I'm trying to run a network throughput test between an OS X and a Linux host. I'd like to be able to measure the sustained throughput from the Linux host to the OS X host over time. I'd like to wrap ...
0
votes
0answers
108 views

Send data over DTLS with socat

I'm trying to exchange files over DTLS with socat with one-liner client/server. I'm able to do it with UDP: server:socat -d -d -lh -lu UDP-LISTEN:5000,reuseaddr,fork OPEN:out.dat,create client:socat ...
0
votes
2answers
68 views

Why my netcat connection doesn't send the file correctly?

I wrote this script to send a file using netcat. My intention is to open the netcat port in the destination server from the origin, this way I do everything with just one script instead of having one ...
0
votes
0answers
74 views

netcat not listening on desired port

When I want to listen on desired port on one server, I use netcat ie: nc -l 8888 Then I can verify the server is actually listening on that port: netstat -tlnp | grep 8888 tcp 0 0 ...
0
votes
0answers
180 views

Piping device file over UDP with netcat

Hopefully this is the best Stack Exchange site for this - I think it's primarily a netcat question. I'm developing a custom data acquisition device. It can probably be best thought of as a fancy ...
0
votes
0answers
310 views

Send apache ssl access log to syslog

I'm having an issue piping apache ssl access logs to my syslog server. I've added the following line to my apache config: CustomLog "|/usr/bin/nc -u <syslogserver> 514" "<134>%{%b %d ...
3
votes
1answer
68 views

How to redirect a udp response with netcat

Similar question to How to get a udp response with netcat except the OP was satisfied with using nc interactively (and I don't have the reputation to comment yet!) I need to be able to code some bash ...
5
votes
3answers
626 views

Sending a file from Docker container to host using nc: Why does host nc close the connection too early?

The following BASH script downloads and builds mpv (https://github.com/mpv-player/mpv-build) in a Docker container, and sends the file to the host using netcat (the host is listening using netcat): ...
2
votes
1answer
266 views

netcat closes established connection between docker containers

I am on coreos and have started three containers. docker run --rm -ti -p 80 --name one ubuntu /bin/bash docker run --rm --link one:one -p $HOST_IP::80 -ti --name two ubuntu /bin/bash docker run --rm ...
1
vote
2answers
1k views

Send Text String to a Socket In Windows

I have a server that has an open socket that listens for a particular text string on it in order to perform an action. Our linux machines send this data via: echo "text_string" | nc -w 2 ...
0
votes
1answer
94 views

When copying VM filesystem over netcat, dd copies double the disk size

I'm attempting to copy the disk of a working headless virtualbox VM (VM1) on one server to a new VM (VM2) on a vCloud server. I don't have access to the host of VM2. The OS is Windows Server 2003 ...
1
vote
1answer
218 views

Netcat UDP File Transfer Between Two Servers Times Out?

I'm testing file transfer speeds between two Red Hat servers that are connected to the same switch within the data center and I decided to use netcat to eliminate protocol overhead as much as ...
-1
votes
3answers
2k views

Can't pipe echo to netcat?

I have the following command: echo 'HTTP/1.1 200 OK\r\n' | nc -l -p 8000 -c and when I curl localhost:8000 I am not seeing HTTP/1.1 200 .. being printed. I am on mac os x with netcat 0.7.1 Any ...
3
votes
1answer
526 views

Difference between /dev/udp and netcat

I have a syslog server listening on localhost:514 as UDP and would like to write messages to it on that port. (Using Ubuntu 14.04) If I run either of these commands this from bash it prints the date ...
2
votes
1answer
483 views

How to test nagios send_nsca with netcat

I am trying to write a unit test of send_nsca using nc but it is failing. I want to start nc to listen to the nsca port and then use send_ncsa to send a message to that port. In one terminal I am ...
1
vote
1answer
87 views

Why Socat is sending back the input to client?

I am using this command socat -lm -d -d TCP4-LISTEN:5555,reuseaddr,fork EXEC:/bin/myscript,chroot=/root/,su=root,pty,stderr to start a server but when i send the i connect to it through netcat and ...
0
votes
1answer
2k views

How to send 0x80 byte to a tcp port using netcat or similar tool?

I'm trying to make a Memcached server respond as if I where using binary protocol. If possible just command line answers pls, no code spinet in any programming language.
1
vote
1answer
4k views

Send echo message to graylog2 via GELF TCP 12201 port

I need to send a message to graylog2 server via echo to test if the %{@type} for facility is corrent, but once I do the echo thats in GELF support does not arrive in to my graylog2 server. If it ...
1
vote
0answers
3k views

How to execute a reverse “Powershell shell” using ncat or netcat?

I am using ncat to execute a reverse "cmd" shell from one machine to another and without any issues using the commands: In my machine: ncat -l 443 In the remote machine: ncat <my ip> ...
1
vote
0answers
183 views

Postfix mailbox_command + netcat + nodejs

I use Node.js script to process incoming emails and pipe them from Postfix via netcat in mailbox_command (namely: nc 127.0.0.1 3002). Node is listening on port 3002 and calls socket.destroy() once ...
3
votes
1answer
1k views

Apache piping log to netcat fails

I want to send my Apache log in a custom format (GELF) to a UDP receiving server (running Graylog2). I was sure everything was working fine but then after a little while, I got an alert, my server was ...
0
votes
1answer
196 views

How to query a munin plugin via netcat?

I want to query a present Munin plugin from Nagios. As I would like to do some calculations and aggregations (the plugin reports data over a period of time) and not just look at the last values, the ...
0
votes
1answer
108 views

Netcat: connection lost before transfer is complete

Interesting thing with Netcat (nc) in CentOS 5 or 6 (nc-1.84-10.fc6 or nc-1.84-22.el6.x86_64). How can I work it around? I can't find a bug about this, but It models a file transfer to a remote ...
0
votes
1answer
195 views

Why isn't nc -vv -l -n -p 8080 working?

I can't get the command working, it should listen to 8080 I am out of idea's with this, any support on this matter?
0
votes
1answer
201 views

Redirect telnet “interactivity” from host 3 to host 1 through host 2 (proxy?)

My network configuration: host 1 [h1] - User machine connected via VPN to the main host (host 2). (Win 7) host 2 [h2] - The gate through other machines of my network. No firewall, no ip rules. (Win ...
0
votes
1answer
443 views

SSH-Connection through gateway nc not working

I have the following problem: I want to connect from a Windows 7 client to a remote Debian 7 Server via an SSH Gateway running on a SLES 11.3 Server. To test the connection I use plink with the ...
1
vote
1answer
3k views

Netcat issue, getaddrinfo: Name or service not known

I am trying to use netcat to relay SSH traffic (bidirectionally) from port 2222 on one host to port 22 on a different host. For test purposes, I redirect to 127.0.0.1:22 here instead of the remote ...
2
votes
1answer
2k views

Automatically close netcat connection

I am executing the following command from a script: echo '{"hostUp": true}' | sudo /usr/local/bin/netcat localhost 8001 However, the netcat client stays open indefinitely. How can I close the ...
3
votes
1answer
4k views

How can I configure netcat (or some other stock linux utility) to listen on a specific port on a secondary IP address?

CentOS 5.9 For testing purposes, I want my CentOS server to listen on a secondary virtual IP (eth0:0). I'm familiar with nc -l -p <port> but it only listens on the primary. Is there a way I ...
1
vote
1answer
97 views

Resend the same file simultaneously with netcat in listening mode

I want to set up netcat in listening mode so that many clients can connect and they all receive the same file. The clients should be able to connect simultaneously... Is this possible?
6
votes
2answers
2k views

nc (netcat) hangs, waiting for more data, in UDP mode.

I'm trying to send a small string to statsd via nc inside of a read block: while read line; do printf "folder.counter:value|1c" | nc -q 0 -u $host $port done Unfortunately, when in UDP mode, nc ...
1
vote
1answer
521 views

How do telnet-based programs report their terminal type to a socket server?

I've written a script called by tcpserver that heavily utilizes tput and similar commands. These commands need to know how to correctly write to the terminal and rely on the TERM variable to obtain ...
0
votes
2answers
433 views

Netcat output pipe, json parsing

What I want is this: netcat to the server, which streams json formatted loglines. pipe the output of nc to "something" that will format the json as plaintext, in a customizable format (thinking ...
0
votes
1answer
197 views

netcat and file transfer

How do I actualy use netcat to transfer files over network? IIRC something like that nc -l -p 12345 > destfile(on the receiving end) + dd if=/dev/sourcedevice| nc ipaddress 12345(on the sending ...
0
votes
2answers
426 views

Using rsyslogd on only 1 of 2 systems

I have two systems. One is a laptop and has rsyslog. The other is embedded system that doesn't have rsyslog. What I'd like to do is log messages from the embedded system on the laptop. I've ...
5
votes
3answers
2k views

Can Netcat talk to an encrypted port?

I am doing some trouble shooting on an application that listens on tcp 443. This particular application talks via SSL. I wanted to connect to it with netcat. Is this possible? Note: I'm not asking ...
8
votes
1answer
6k views

Proxy with netcat forever

I am proxying a VNC TCP server port with netcat. The proxy machine runs linux. This is the comand I use: mkfifo backpipe nc -l 5902 0<backpipe | nc 10.1.1.116 5902 1>backpipe 10.1.1.116 is ...
1
vote
1answer
262 views

netcat doesn't transfer complete file when using UDP

I use the following in order to transfer bigfile (11GB): cat bigfile | pv -L 11m | nc -u 10.0.0.1 3333 After 1.6GB the client stop to transfer (in the target machine i dont see packets ) This is ...
2
votes
2answers
3k views

How can I see sent/received data by netcat?

I follow this post to check speed with netcat , but in his blog when he do ctrl-c ,he get data on sent received bytes. In the post he ran : time yes|nc -v -v -n 192.168.0.8 2222 >/dev/null than ...
1
vote
2answers
1k views

Using nc.exe (NetCat) to send emails to secured SMTP server (TLS)

I used to send emails to unsecured SMTP servers using nc.exe utility (Windows port of NetCat) and now I need to send the same emails to a secured SMTP server (TLS). What additional parameters do I ...
0
votes
1answer
642 views

Banner Grabbing DNS? [closed]

How does one banner grab DNS? I'm able to banner grab other services such as HTTP/FTP/SMTP but for DNS it's not immediately obvious. Typically for HTTP I use nc with HEAD / HTTP/1.1 {ENTER}{ENTER}. ...
0
votes
1answer
504 views

Chrome rejecting connections to netcat webserver

I have a very simple netcat webserver set up to display the /etc/motd file for some machines, which works fine in Firefox, but intermittently fails in Chrome. I suspect it's an HTTP header / caching ...