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

learn more… | top users | synonyms

0
votes
0answers
6 views

nc exits immediately, on connection, when run as an upstart job

I'm using the following /etc/init/jsonlog.conf upstart job: description "jsonlog" start on runlevel [23] stop on runlevel [06] respawn script cd /tmp echo "about to listen" /bin/nc -l ...
0
votes
1answer
24 views

Netcat - socket in time_wait when echoing and piping, but not when invoked directly

I'm testing an application using netcat (nc) and I'm getting very low throughput on network connections. When I ran netstat -tnpo I see numerous TCP sessions in TIME_WAIT. I'm sending data to my ...
0
votes
0answers
29 views

netcat UDP port test response issue

I am running a game server on a Windows Server 2008 VPS/VDS through port 12203. I want to be able to automatically restart the game server exe file if it crashes. So, my strategy is to use netcat to ...
-1
votes
1answer
27 views

Netcat UDP transfer never stop until terminated via CTRL+C

I'm trying to send data across machine using Netcat using UDP instead of TCP. Now, unlike TCP(Netcat over TCP) which used to mark the completion of the file transfer by exiting the nc process, the ...
0
votes
0answers
12 views

netcat relay mirror for arbitrary protocol number

How can I set up netcat to listen for incoming packets on protocol number 150 and send them back (to the source IP of the packet) with the same protocol number? So, everything that arrives on the host ...
-1
votes
1answer
167 views

Sending mail using netcat - getaddrinfo: Name or service not known [closed]

i am trying to send a mail using netcat, and i am getting an error: nc: getaddrinfo: Name or service not known this is the command i am using /usr/bin/nc smtp.xxxxx.yy 25 < test.txt this is ...
1
vote
1answer
61 views

tcp retransmit via curl and netcat

I'm trying to setup iptables to cause realistic network failures between docker containers. On the server, I run both netcat -lk 1234 and an Erlang cowboy server. On the client I run clients: echo ...
0
votes
0answers
84 views

Remote backup with netcat and Ansible

I try to backup my servers with Ansible. My setup is like this: SERVER 1..n (my data I want to backup) ANSIBLE_HOST (on this server my Ansible backup playbook is executed by a cron job) ...
-2
votes
2answers
36 views

No nc arguments being recognized

I'm having trouble using my nc command. Everytime I enter any parameter, even using -h, linux just prints: *BusyBox v1.20.2 (2014-05-14 13:19:21 EDT) multi-call binary. Usage: nc [IPADDR PORT]* I ...
-1
votes
3answers
96 views

Contacting DNS server via command line interface [closed]

So, we are on the DNS chapter in our class, and I was wondering if there's any way possible though which I can connect to a DNS server on port 53 via command line interface (i.e Telnet or netcat) like ...
4
votes
4answers
1k views

Netcat fails to start in listening mode

I'm using CentOS 6.7 (Final) system, and when I try to run nc in listening mode it prints the following: # nc -l 1234 nc: Protocol not available The port is not bound. I tried other port numbers ...
1
vote
1answer
61 views

netcat unable to connect to remote host

I've asked this on the DigitalOcean forum but haven't heard any responses. I have a droplet running Debian 8.1 x64 and I'm trying to set up a basic netcat connection (I'm using nc.openbsd on both my ...
0
votes
0answers
17 views

EC2 :: netcat localhost 44444 “Connection refused” [duplicate]

It may be some very simple problem... but when I try netcat on my ec2 instance running RHEL, $ nc -v localhost 44444 Ncat: Version 6.40 ( http://nmap.org/ncat ) Ncat: Connection refused. Similarly ...
1
vote
1answer
218 views

netcat / named pipe proxy over ssh

I am used to forwarding a remote service port on localhost using ssh like: ssh -L 2181:localhost:2182 user@server (forward remote host port 2182 to local port 2181) now, from the machine I ssh to, I ...
3
votes
1answer
880 views

Netcat not able to bind a listening socket

In my computer with Ubuntu 14.04 I can do things like this: $ nc -l 5349 -vvv Listening on [0.0.0.0] (family 0, port 5349) or this: $ nc -vvv -l 192.168.254.96 5349 Listening on [192.168.254.96] ...
2
votes
0answers
32 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
72 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
74 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
165 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
130 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
51 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
66 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
64 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
197 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
182 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
107 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
113 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
256 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
535 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
95 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
990 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
386 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
2k 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
110 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
372 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
3k 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
679 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
676 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
115 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 ...
2
votes
1answer
3k 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.
3
votes
1answer
6k 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
4k 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> ...
2
votes
0answers
215 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
215 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
124 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
278 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
235 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
543 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
4k 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 ...