Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [netcat]

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

0
votes
0answers
10 views

How check connection from list host:different_port or host different_port? [on hold]

I have list host:port or host port 10.2.53.211 443 10.2.53.222 443 10.2.53.233 24224 10.2.53.24 24224 10.2.53.86 53 10.2.53.94 53 10.2.64.152 443 10.2.64.152 8140 10.2.64.86 8140 10.2.64.87 8140 10....
0
votes
0answers
15 views

Measuring Size of received UDP packet on port?

I would like to measure the size of a RECEIVED UDP packet on one of my ports. I have an application sending some binary data and I would like to measure the UDP packet size on the received end. I ...
2
votes
1answer
69 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....
0
votes
0answers
32 views

Mirror local-connection-only port to any-connection network port

I have two containers; producer and consumer on the default bridge network with docker-compose. producer has a service running on a local socket and consumer cannot access it. I need to mirror a ...
2
votes
2answers
136 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) ...
2
votes
1answer
79 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@...
1
vote
1answer
302 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:...
0
votes
1answer
53 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 ...
0
votes
1answer
24 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 ...
1
vote
1answer
261 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 ...
0
votes
0answers
719 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 ...
0
votes
0answers
49 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 ...
0
votes
1answer
135 views

How can i set the source port for SSH on unbuntu server? [closed]

I am creating a web challenge, and due to a firewall, i need to be able to set a static port for the SSH source port for it to go through the firewall. Is their anyway to do this using maybe netcat ...
0
votes
1answer
224 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 ...
0
votes
0answers
114 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 ...
1
vote
0answers
307 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 ...
0
votes
1answer
3k 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 ...
1
vote
0answers
159 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, ...
1
vote
1answer
68 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 ...
0
votes
0answers
550 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 and DELETE are allowed and enabled. I’ve read that ...
0
votes
1answer
455 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 ...
1
vote
1answer
252 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 ...
1
vote
0answers
415 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 ...
0
votes
1answer
423 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: ...
-3
votes
1answer
185 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 ...
1
vote
0answers
238 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 ...
2
votes
1answer
2k 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)....
0
votes
1answer
68 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....
0
votes
1answer
52 views

liptables ssh rule is not working

I have 2 virtual machines using virtual box. One virtual machine work as a router. Im trying to drop all communications entering the router machine, excpet for some services. The interfaces ips that I ...
1
vote
1answer
352 views

test iptables rules using netcat is not working

I have 4 virtual machines using virtual box. One virtual machine work as a router that connects 3 networks. Im trying to drop all communications entering the router machine, excpet for some services. ...
1
vote
2answers
2k views

Why does tcpdump see a reply, but not netcat

I'm debugging a OpenVPN site-to-site connection using UDP in netcat. I can get packets to flow in one direction (host A->host B), but not the reverse one. root@hosta:~# nc 10.0.3.2 1234 -u root@...
1
vote
3answers
81 views

Localization - agnostic output for netcat

I would like to use netcat to test if some ports are listening or not but, since the command will be executed in machines that will have languages different than English, it's not a great idea to grep ...
-1
votes
1answer
336 views

netcat, reopen TCP socket

I have a bash script: #!/bin/bash while : do nc -l -p 30003 | python3 script.py done I want that listening works all time. nc localhost 30003 # works, fine *type something* Ctrl+C ...
0
votes
1answer
505 views

Why does a port I've set to allow all incoming traffic + edge traversal, still block or filter incoming traffic?

I opened Port 4444 through windows 7 firewall to allow all traffic from all IPs and protocols, including allowing edge traversal. On that machine, a netcat listener is set up to listen on port 4444. I ...
-1
votes
2answers
1k views

RESOLVED: Limiting NetCat listening to specific network

I would like to get your help to figure out how to use NetCat to listen to a specific port accepting connection only from the hosts in a specific network. I have a server that I would like to share a ...
0
votes
3answers
2k views

Why do netcat scans for UDP ports always succeed?

I'm trying to verify that a couple of our servers can communicate via certain ports before migrating some of our services to them, and that they're not blocked by our organizations firewall ACLs. ...
0
votes
1answer
552 views

How to debug a “connection refused” error with tshark?

I'm trying to establish a simple TCP connection between two machines in the same subnet (wireless network). The tool used is netcat. On machine A, I start a listener: nc -l -p 4506 On machine B, I ...
15
votes
2answers
22k views

Check if remote host/port is open - Can't use GNU Netcat nor NMap - RHEL 7

At work, the infrastructure team is rolling out new VMs with RHEL7 installed as the base OS. This particular image comes with the nmap-ncat version of Netcat and does not have NMap installed. We are ...
0
votes
0answers
605 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 ...
6
votes
2answers
8k 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 output ...
2
votes
2answers
903 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
318 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
667 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
2answers
4k 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
234 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 ...
-1
votes
2answers
631 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 ...
-1
votes
1answer
2k 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 the ...
1
vote
1answer
786 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 ...
1
vote
0answers
794 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
616 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 ...