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
1
vote
0 answers

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) BACKUP_STORE (on this server my backups are stored) Now I try…
tbraun89
  • 111
  • 6
1
vote
2 answers

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 am trying to reach a tcp service and forward the…
MrE
  • 418
  • 1
  • 6
  • 14
1
vote
0 answers

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, I run netcat in listening mode on any port: nc…
arvidj
  • 203
  • 1
  • 7
1
vote
0 answers

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.0.0.0:8888 0.0.0.0:* LISTEN …
1
vote
2 answers

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 server-name port# Is this possible on Windows (possibly in…
1
vote
1 answer

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 possible. Testing in TCP mode went well and I was…
Mark Bowytz
  • 113
  • 7
1
vote
1 answer

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 send some input, it sends back input+output . Why…
user2001987
  • 113
  • 4
1
vote
1 answer

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 following command plink.exe root@ -nc…
phenom135
  • 107
  • 1
  • 4
  • 13
1
vote
1 answer

netcat doesn't transfer complete file when using UDP

I use the following in order to transfer bigfile (11GB): cat bigfile | pv -L 11m | nc -u 10.0.0.1 3333 After 1.6GB the client stop to transfer (in the target machine i dont see packets ) This is not lost packet problem, because the PV is on the cat…
Avihai Marchiano
  • 612
  • 3
  • 16
  • 32
1
vote
1 answer

Chrome rejecting connections to netcat webserver

I have a very simple netcat webserver set up to display the /etc/motd file for some machines, which works fine in Firefox, but intermittently fails in Chrome. I suspect it's an HTTP header / caching issue, but I'm not sure what I need to do to make…
dimo414
  • 385
  • 1
  • 3
  • 16
1
vote
2 answers

How do I make ncat not send a line-feed?

I'm on Windows 7 Powershell and have ncat from http://nmap.org/ncat/ I'm trying to send "foo" to some network device PS> ncat -u 192.168.1.255 6061 foo but it sends "foo\n" (66 6f 6f 0a) and the line-feed makes the device not recognize the command.…
tladuke
  • 311
  • 1
  • 3
  • 11
1
vote
2 answers

How do you redirect (one way only) udp packets to another host using netcat?

How do you redirect (one way only) udp packets to another host using netcat? nc -l -u 0.0.0.0 12345 | nc -u 192.168.1.128 12345 stops after successfully redirecting the first packet. (Note: an iptables solution would also be useful.) Thanks, Chris.
fadedbee
  • 2,068
  • 5
  • 24
  • 36
1
vote
3 answers

Automate hop by hop telnet to Cisco router

I need to automate telnet to a Cisco router and get a "show version" result. The problem is, I need to first to telnet to A, from there telnet to B and then only be able to telnet to the Cisco router. I've tried below, but didn't…
zaidwaqi
  • 153
  • 1
  • 6
1
vote
1 answer

netcat not found in Amazon AMI (Centos)

I followed this guide to migrate my amazon image from one zone to another. Everything goes fine, but when i run this command: netcat -p 9999 -l >/dev/sdf It shows that the command is not found. Then i tried to use nc instead: nc -p 9999 -l…
1
vote
2 answers

Compress streaming data before sending

The following is working as expected. Sending server: mysqldump db_name tbl_name -d | nc -l 1234 Receiving server: nc 10.10.10.114 1234 | mysql -uroot -proot@123 test When I am dumping to remote server, it takes a lot of time to transfer data. Is…
shantanuo
  • 3,579
  • 8
  • 49
  • 66