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
27 views

How to make a tunnel connection behind NAT with iptunnel/netcat?

How can I create an IP tunnel to a server on the internet with a device that is firewalled behind a NAT? I need to do this using only the commands iptunnel or nc. I'm not controlling the NAT router. ...
0
votes
0answers
37 views

multiplexing a TCP connection through a dumb shell connection?

I am connecting to a VPN whose gateway is sufficiently misconfigured that basically the only useful thing I can do with it is to ssh to a specific Linux host set up for my usage inside the VPN, and ...
0
votes
0answers
6 views

Banner Grabing - Neccessary steps involved?

I want to check if it is necessary to enumerator all the banner in any given server. Using my following instance. And also to check if I miss out anything like using HEAD instead. Would like a better ...
1
vote
1answer
24 views

make netcat listen for multiple UDP packets

If I run a simple UDP listener like this: nc -l -u -p 1234 Then I appear to only get the first inbound UDP packet. For example if I run: $ echo abc | nc -u localhost 1234 ["abc" appears in ...
2
votes
2answers
47 views

Check if iptables rules are working

I have three virtualboxs. 1) Virtual machine VM-A that works as a router with two interfaces: eth0 - 10.160.10.254 eth1 - 172.10.0.254 2) Virtual machine VM-B that works as an internal network ...
0
votes
1answer
20 views

Proxy to add CORS headers with netcat

I'm looking for a little script using nc which will be used to add CORS headers (at least Access-Control-Allow-Origin: *) in order for my local ionic dev application to access a remote webservice.
-1
votes
1answer
22 views

Can't connect to socket from outside

I have a problem on my server when I start an application that listen to a port: I can connect to it from the same machine, but not from the ouside world. I noticed this problem when trying to create ...
0
votes
0answers
42 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
33 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
37 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
57 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
18 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
398 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
118 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
150 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
43 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
322 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 ...
6
votes
5answers
2k 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
150 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
2answers
626 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
2k 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
36 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
2answers
141 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
139 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
261 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
191 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
70 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
95 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
75 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
299 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
2answers
117 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
125 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
321 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
635 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
119 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
1k 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
493 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
3k 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
122 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
528 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
4k 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
735 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
825 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
141 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
4k 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.
6
votes
1answer
8k 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 ...
0
votes
1answer
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
233 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 ...