Questions tagged [netcat]

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

features:

  • Outbound and inbound connections, TCP or UDP, to or from any ports.
  • Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel.
  • Built-in port-scanning capabilities, with randomizer.
  • Advanced usage options, such as buffered send-mode (one line every N seconds), and hexdump (to stderr or to a specified file) of trasmitted and received data.
  • Optional RFC854 telnet codes parser and responder.
186 questions
0
votes
1 answer

How to start netcat listening server in Ansible?

I'm working on larger Ansible playbook. One of the tasks I'd like to use is to do "TCP ping" using netcat. On one of the hosts, I'd like to start a netcat 'server', and then start the 'client' to send any string to the server. I'm testing this…
zbro
  • 27
  • 6
0
votes
0 answers

How can I print the payload received with ncat?

I'm creating an UDP server with the following command: ncat -ulk -p 3333 -c "echo asd" -vv It does receive connections and answers to them correctly, but it doesn't print the UDP payload that comes in the client's message. The client I'm using is…
Dan
  • 145
  • 1
  • 2
  • 6
0
votes
1 answer

Netcat UDP server is not sending a response

I'm trying to get OpenBSD netcat to listen to UDP connections on a particular port (3333) and interface (10.42.0.1) and send a fixed response. To achieve this I do: echo "asd" | nc -k -u -l -p 3333 -s 10.42.0.1 -v And then I send a message by…
Dan
  • 145
  • 1
  • 2
  • 6
0
votes
0 answers

listen and redirect TCP stream to file with multi client support in the background

is there any tool I can listen on some port and accept any client and redirect the stream to a file. I know it can be done using netcat but it seems netcat cannot keep running in the background. I did following using netcat: nc -k -d -l -p 9999 >…
0
votes
1 answer

nc tool not showing any output on busybox for localhost

Any ideas why nc is not showing anything when ran on a busybox based container image? The problem appears when trying to connect to port on 127.0.0.1/localhost. /app # nc -v 127.0.0.1 12345 /app # nc -v localhost 12345 /app # nc BusyBox v1.35.0…
nosalan
  • 131
  • 1
  • 3
0
votes
1 answer

traceroute shows stars but netcat reaches the port

I have several (virtual) machines with Centos 7 in the same subnet with several instances of my app running on each of them. I need to test how the apps can reach each other by UDP. I'm trying to access one machine from another one by tracerote. So…
Mike Siomkin
  • 223
  • 1
  • 7
0
votes
0 answers

Unable to stream data from Google Cloud to local machine

I'm trying to stream stdout from a VM on Google Cloud Compute Engine to a local machine using nc: $ mycommand | nc mydomain.net 12345 And listening on the local machine $ nc -l 12345 | analysis-script Port 12345 is open on both cloud VM and local…
seamux
  • 1
0
votes
0 answers

netcat no reaction to syn packet crafted with gopacket

I want to do some experiments with TCP packets. Therefore I am using the gopacket (v1.1.19) to craft packets and send them onto an interface. I have this code for creating a SYN packet and putting it on loopback and sending to 127.0.0.1:8888 where I…
0
votes
0 answers

UDP to Serial port

I look for some solution for connect serial/UART port by UDP connection to another PC. Now I use socat and have connection , but with lost packages, and slow transfer. Can I use netcat for this, maybe it will get better solution? Can I get some…
0
votes
0 answers

Udp punchhole between two instances behind two different cloud NAT on GCP

Hi I'm trying to achieve UDP punchhole concept between two compute instances (on different networks with no public IP) behind two different cloud NATs for their respective networks. It seems that in logging I can see the connection being established…
Vinayak S
  • 1
  • 1
0
votes
0 answers

transfer file at iperf bandwidth/throughput

I need to transfer a file between 2 servers, the output of iperf is: TCP window size: 85.0 KByte (default) ------------------------------------------------------------ [ 3] local X.X.X.X port 58986 connected with Y.Y.Y.Y port 5001 [ ID] Interval …
nbari
  • 558
  • 1
  • 9
  • 28
0
votes
1 answer

Alternative for "nc -z localhost 3300" for windows [netcat]

I have a sh that is meant to run in linux. But im using windows, and I must be able to run it in windows Theres a piece of code that does the following while ! nc -z localhost 3300; do echo "Waiting for MariaDb" sleep 0.1 done But im unable…
mouchin777
  • 117
  • 1
  • 6
0
votes
0 answers

All traffic on port 5060 gets lost in whole network

I am having issues forwarding port 5060 in my firewall/router to a FreeSWITCH server. Our firewall/router is an Uniquiti Edge Router X. The server's local IP is 10.0.0.216, the router's 10.0.0.1. Moreover, we have some other PCs in the network,…
0
votes
1 answer

netcat-openbsd in RHEL/Centos (RPM)

There are two versions of netcat (nc) utility: netcat-openbsd and GNU netcat. For example, in some distributives like Debian or Arch user could choose which version of the package he/she would like to install. I was searching the internet but have…
ololoid
  • 1
  • 2
0
votes
1 answer

Netcat stops listening after Recv-Q fills up

I am running Netcat on an Ubuntu 18.04.3 LTS server, to listen on port 469. This server gets frequent TCP requests from other machines to port 469, which I use to monitor the server for uptime. I start Netcat with: nc -kl 469 and I can see the…
Prospero
  • 1
  • 2
1 2 3
12
13