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
0 votes
1 answer
34 views

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 ...
user avatar
0 votes
0 answers
17 views

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-...
user avatar
  • 1
0 votes
0 answers
146 views

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 ...
user avatar
0 votes
0 answers
41 views

OpenBSD netcat times out depending on network interface

There is a network I'm accessing using PPTP VPN. I'm trying to setup something to monitor if the network is accessible, and email me if not. I've got a Raspberry Pi, it's connected to the network ...
user avatar
0 votes
0 answers
115 views

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 ...
user avatar
0 votes
0 answers
45 views

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 ...
user avatar
0 votes
1 answer
149 views

Scanning a range of ports with Ncat?

I'm aware that Nmap is the obvious choice for this task, however I would still like to know if it's possible to scan a range of ports with Ncat. I see that I'm able to scan one port, but with a range ...
user avatar
  • 101
0 votes
0 answers
111 views

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 ...
user avatar
  • 548
0 votes
0 answers
780 views

Netcat on MacOS failing with simple commands

I'n trying to follow a tutorial here. As an example we can say that we need a friend of ours to help us with something on our work system(Windows). To be able to receive a connection from us first ...
user avatar
1 vote
0 answers
187 views

'socat' not displaying incoming UDP packets, but Wireshark does

The link is an image of a Wireshark dump of an incoming 60-byte Ethernet frame which contains a UDP packet. The packet payload is the single word 'hello' (sorry, I don't have enough rep to paste the ...
user avatar
  • 35
0 votes
1 answer
967 views

What does `Accept-Encoding: gzip,deflate` mean?

Can someone explain what it means when I see Accept-Encoding: gzip,deflate when listening with ncat? Does it mean the body is compressed? And if so, how can I decompress it? $ nc -lnvp 4000 Ncat: ...
user avatar
  • 9,913
0 votes
1 answer
1k views

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 "...
user avatar
0 votes
0 answers
154 views

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. ...
user avatar
0 votes
1 answer
830 views

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 ...
user avatar
2 votes
1 answer
2k views

Is there a built-in way to proxy SSH through socks5?

I have a Socks5 proxy that uses username/password authentication. I can use it with SSH using NCAT in the ProxyCommand: ssh -o ProxyCommand="ncat --proxy-type socks5 --proxy-auth username:...
user avatar
0 votes
1 answer
245 views

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 ...
user avatar
1 vote
1 answer
673 views

UDP connection i/o timeout while port is reachable

on one server we encountered an issue where all kinds of UDP connections are failing. The same application and tests work on other servers with the same OS and similar setup. nc -vz -u 83.61.**.** ...
user avatar
0 votes
1 answer
321 views

How to check the udp port is accessible in an Ubuntu machine which is protected by a firewall

We were trying to install "Big blue button" in an Ubuntu server with a firewall. For installation, we need these UDP ports ("16384-32768") should be opened in the firewall. But we don't know whether ...
user avatar
  • 37
1 vote
1 answer
906 views

How to capture UDP traffic so it can be piped to grep

I'm trying to capture UDP traffic which is being sent as StatsD metrics (on port 8125). The most simple approach I tried is to run nc -ul 8125 which prints the metrics to the terminal...but they are ...
user avatar
  • 113
0 votes
1 answer
121 views

Spawn background process from ncat

How can ncat be used to spawn a process in the background? For example: ncat -lp 2342 -c "setsid sleep 5 &" As I understand, setsid and & will make the process run in the background but ncat ...
user avatar
  • 101
3 votes
2 answers
2k views

Routing TCP packets to a local UDP port

A third party server sends UDP packets to an EC2 instance we've set up and I'm trying to route those packets to my local machine. The client sends these packets to port 8975 To that effect I first ...
user avatar
  • 153
0 votes
1 answer
463 views

Simple netcat Responder

Trying to create a simple netcat responder: The "server" would be: $ while true; do { ./secret.sh; } | sudo netcat -k -q -1 -l 123; done secret.sh is: #!/bin/bash read line if [ "$line" == "open" ]...
user avatar
  • 332
1 vote
1 answer
78 views

nc prints (?). What does (?) mean?

When I use nc to test a port as followed, it prints out a result with '(?)' in it. I've looked up the man page and also online but I can't find an answer. Can someone please shed some lights? Thanks. ...
user avatar
  • 155
1 vote
0 answers
219 views

Netcat gives different responses based on IP I give it

I'm currently trying to diagnose why my build of Libreoffice online keeps giving '504 Timed Out' errors on my nginx reverse proxy. I shutdown the entire daemon, hoping to see an error along the lines ...
user avatar
2 votes
1 answer
5k views

Connection refused from localhost to localhost

I started a tcp listener using nc -l 127.0.0.1 900 and then attempted to connect to it using nc 127.0.0.1 900 when I got the connection refused error. The same happens when connecting using telnet. ...
user avatar
2 votes
3 answers
1k views

Why am I only achieving 2.5Gbps over a 10Gbe direct connection between 2 machines?

I have 2 machines directly connected to each other with a 7 foot Cat6a ethernet cable (included in the box of the NIC cards). The PCIe x4 NIC I bought and in both machines is this: https://www.amazon....
user avatar
  • 121
2 votes
3 answers
2k views

Achieving very fast (300+MB/sec) file transfer on Linux

I'm working with high end hardware, however I'm hitting cpu bottlenecks in all situations when attempting to move large amounts of data. Specifically, I'm moving large virtual machine image (VHD) ...
user avatar
  • 376
2 votes
1 answer
310 views

SSH tunnel and reverse SSH tunnel at the same time on the same port

I have a computer A, a server B (Azure VM) and a second computer C. I want to connect from A to C through the server B. Setup: A: ssh -i location_of_private_key -L 12000:public_IP_of_B:20000 user@...
user avatar
1 vote
2 answers
6k views

netcat host not found when listening

i am trying to connect two hosts using netcat. i have downloaded netcat for windows, but when i run the command nc -L -vv -p 4444, it fails with the error nc: forward host lookup failed: h_errno 11001:...
user avatar
0 votes
1 answer
1k views

Send data recieved by netcat to script

I'm trying to take data I receive over a netcat connection to a script that will send each line to another server via a curl post command. Heres where I am. This works: nc -lk 9272 > test.log ...
user avatar
  • 137
0 votes
1 answer
335 views

EHLO returns nothing with postfix initialized working on port 25

So I reinstalled postfix several times because of different issues. Turns out it starts well and seems to be working on port 25: I make netstat -nltp | grep 25 tcp 0 0 127.0.0.1:25 ...
user avatar
  • 101
1 vote
1 answer
1k views

Netcat connection refused apache2 localhost

I have installed webserver (apache) but I can't seem to make netcat connect to it. $ curl localhost:80 | head % Total % Received % Xferd Average Speed Time Time Time Current ...
user avatar
1 vote
2 answers
7k views

Connect to an SSH server over an HTTP proxy using plink and netcat

I'm trying to connect to an SSH server from a Windows PC behind a corporate HTTP proxy. The trick works under Debian using OpenSSH client with ncat from the nmap package, but it does not work under ...
user avatar
0 votes
0 answers
72 views

Restore linux partition from remote server

I have a running server with /dev/sda1 partition and a remote server with /dev/sda1 partion also. I want to clone the partition of running server to remote server. I want to try this: On remote ...
user avatar
  • 3
4 votes
1 answer
4k views

How can I set the source port for an SSH command-line client? [closed]

I am creating a web challenge, and due to a firewall, I need to be able to bind an SSH client source socket to a fixed port to pass its traffic through the firewall. Is there any way to do this using ...
user avatar
  • 45
0 votes
0 answers
512 views

Link VPS Dedicated IP / Port to Internal Tinc VPN IP Port

After a couple of days research I've completely rewritten my question to make it easier to answer, and hopefully clearer of what I'm looking for. I have an Ubuntu 18.04 VPS server with a dedicated ...
user avatar
  • 1
0 votes
0 answers
351 views

Can I use netcat for centralized logging?

I have multiple Apache servers and I want to centralize their access logs. I wonder if I can use named pipes and netcat for that, however I am afraid that 2 things may happen: The central log will be ...
user avatar
  • 1
2 votes
0 answers
1k views

How to send binary data in netcat to an already established connection?

I can do the following to send binary data in netcat: echo -e '\x80' | nc host port But I don't want to do it like this, what I want is to connect to a server: nc 192.168.1.115 12345 And then send ...
user avatar
0 votes
1 answer
13k views

How to connect netcat from one local computer to another local computer

I want to connect two computers using netcat that are on the different subnets The problem is when I start Netcat to listen on one computer, I am unable to connect to it from another computer which ...
user avatar
1 vote
0 answers
280 views

Some clients time out when making a simple TCP proxy with netcat

I have made a simple TCP proxy that rewrtites requests using netcat like so: nc -q -1 -k -l 8080 < myfifo | sed -u 's/something/something_else/' | nc -q -1 example.com 80 > myfifo However, ...
user avatar
1 vote
1 answer
245 views

How to write and read from the same file using two netcats?

I'd like to use a file as a temporary buffer to connect two netcat processes. I need to use a buffer because data is sent and requested on each end at different intervals. I want to use a file instead ...
user avatar
  • 465
0 votes
1 answer
7k views

Check if HTTP Methods have been Allowed and Enabled on Localhost

I’m running Apache/2.2.15 (Unix) on a RHEL system. My LAMP is running on localhost. I want to check if the HTTP methods: POST GET PUT DELETE are allowed and enabled. I’ve read that they can be ...
user avatar
  • 109
0 votes
1 answer
2k views

openVPN server doesn't listen to client through netcat

I am working on a ROS project for which is required a VPN connection between a client (my pc in this case) and the server (aws server). I used openVPN to create a tun0 interface through which both ...
user avatar
  • 101
1 vote
1 answer
507 views

ncat on UDP protocol (RH 7)

I'm resuming the discussion "Check if remote host/port is open - Can't use GNU Netcat nor NMap - RHEL 7". I can't obtain the correct result because on my rh versions (5.6 and 7.1) there isn't the path ...
user avatar
  • 111
1 vote
0 answers
823 views

Socat interacting with specific host (reverse shell) from mutiple clients/connections

I have a threaded c/c++ application that gives a pty reverse shell installed on multiple linux clients they all connect back to same server/port now I need to find a reliable method to interact with a ...
user avatar
0 votes
1 answer
1k views

How can I tunnel multicast traffic?

I am trying to receive multicast on 1 machine, forward it to another machine, and then replay it on that machine. test_env: the machine which has access to the original multicast stream mcast_sender: ...
user avatar
-3 votes
1 answer
739 views

Why I can only send 3 row via netcat on UDP port?

I am new to this command I am sending a file data on UDP 9415 port . --> I have file which has 1000 rows --> I am firing here IP is my destination IP cat test1 | netcat -u 172.x.x.x 9514 --> Now ...
user avatar
3 votes
0 answers
1k views

How can I test network connectivity to a Keberos KDC (UDP/88)

How can I test network connectivity to a Keberos KDC (UDP/88)? Does Kerberos have a standard way to communicate that gives any output? HTTP for example, nc -v google.com 80 GET will dump the ...
user avatar
  • 7,606
3 votes
1 answer
5k views

How can I capture the exit status of `nc` when run from `timeout`?

I want to test connectivity to an arbitrary host using netcat. It seems the -w argument does not actually close the connection after 5 seconds. (This is on Ubuntu 14.04 and netcat-traditional 1.10-40)....
user avatar
  • 3,454
0 votes
1 answer
76 views

iptables rule between networks is not working

I have a scenario where a router connects 2 networks, so I have this machines with this interfaces: The virtual machine 1 that work as a router: eth1: 193.136.200.254 eth2: 192.168.10.254 eth3: 24....
user avatar
  • 15