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

learn more… | top users | synonyms

1
vote
0answers
39 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> ...
0
votes
0answers
19 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 ...
2
votes
1answer
42 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 ...
0
votes
1answer
58 views

How to query a munin plugin via netcat?

I want to query a present Munin plugin from Nagios. As I would like to do some calculations and aggregations (the plugin reports data over a period of time) and not just look at the last values, the ...
0
votes
1answer
45 views

Netcat: connection lost before transfer is complete

Interesting thing with Netcat (nc) in CentOS 5 or 6 (nc-1.84-10.fc6 or nc-1.84-22.el6.x86_64). How can I work it around? I can't find a bug about this, but It models a file transfer to a remote ...
0
votes
1answer
48 views

Why isn't nc -vv -l -n -p 8080 working?

I can't get the command working, it should listen to 8080 I am out of idea's with this, any support on this matter?
0
votes
1answer
64 views

Redirect telnet “interactivity” from host 3 to host 1 through host 2 (proxy?)

My network configuration: host 1 [h1] - User machine connected via VPN to the main host (host 2). (Win 7) host 2 [h2] - The gate through other machines of my network. No firewall, no ip rules. (Win ...
0
votes
1answer
153 views

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 ...
0
votes
0answers
64 views

Netcat relay issues

I have a legacy database application that can be accessed via ODBC on port 3000. I have set up a simple netcat relay on a bastion host so that this ODBC access can be done via the bastion host: ...
0
votes
1answer
417 views

Netcat issue, getaddrinfo: Name or service not known

I am trying to use netcat to relay SSH traffic (bidirectionally) from port 2222 on one host to port 22 on a different host. For test purposes, I redirect to 127.0.0.1:22 here instead of the remote ...
0
votes
0answers
107 views

Multi-hop ssh with netcat ProxyCommand demands tty

I'm trying to set up my .ssh/config to let me ssh into a server via a jumphost as I normally would: StrictHostKeyChecking no UserKnownHostsFile=/dev/null ForwardAgent yes Host jump Hostname ...
0
votes
0answers
194 views

Why am I getting a address already in use with Netcat?

I am attempting to pass tcp traffic from port 6667 to UDP port 501 with: nc -l 6667 < /tmp/fifo | nc -u 71.20.1.16 501 > /tmp/fifo However I always get the error "nc: Address already in use". ...
0
votes
1answer
179 views

Automatically close netcat connection

I am executing the following command from a script: echo '{"hostUp": true}' | sudo /usr/local/bin/netcat localhost 8001 However, the netcat client stays open indefinitely. How can I close the ...
1
vote
1answer
555 views

How can I configure netcat (or some other stock linux utility) to listen on a specific port on a secondary IP address?

CentOS 5.9 For testing purposes, I want my CentOS server to listen on a secondary virtual IP (eth0:0). I'm familiar with nc -l -p <port> but it only listens on the primary. Is there a way I ...
1
vote
1answer
45 views

Resend the same file simultaneously with netcat in listening mode

I want to set up netcat in listening mode so that many clients can connect and they all receive the same file. The clients should be able to connect simultaneously... Is this possible?
1
vote
1answer
419 views

nc (netcat) hangs, waiting for more data, in UDP mode.

I'm trying to send a small string to statsd via nc inside of a read block: while read line; do printf "folder.counter:value|1c" | nc -q 0 -u $host $port done Unfortunately, when in UDP mode, nc ...
1
vote
1answer
277 views

How do telnet-based programs report their terminal type to a socket server?

I've written a script called by tcpserver that heavily utilizes tput and similar commands. These commands need to know how to correctly write to the terminal and rely on the TERM variable to obtain ...
0
votes
2answers
182 views

Netcat output pipe, json parsing

What I want is this: netcat to the server, which streams json formatted loglines. pipe the output of nc to "something" that will format the json as plaintext, in a customizable format (thinking ...
0
votes
1answer
119 views

netcat and file transfer

How do I actualy use netcat to transfer files over network? IIRC something like that nc -l -p 12345 > destfile(on the receiving end) + dd if=/dev/sourcedevice| nc ipaddress 12345(on the sending ...
0
votes
2answers
149 views

Using rsyslogd on only 1 of 2 systems

I have two systems. One is a laptop and has rsyslog. The other is embedded system that doesn't have rsyslog. What I'd like to do is log messages from the embedded system on the laptop. I've ...
2
votes
3answers
385 views

Can Netcat talk to an encrypted port?

I am doing some trouble shooting on an application that listens on tcp 443. This particular application talks via SSL. I wanted to connect to it with netcat. Is this possible? Note: I'm not asking ...
2
votes
1answer
1k views

Proxy with netcat forever

I am proxying a VNC TCP server port with netcat. The proxy machine runs linux. This is the comand I use: mkfifo backpipe nc -l 5902 0<backpipe | nc 10.1.1.116 5902 1>backpipe 10.1.1.116 is ...
1
vote
1answer
127 views

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 ...
1
vote
2answers
1k views

How can I see sent/received data by netcat?

I follow this post to check speed with netcat , but in his blog when he do ctrl-c ,he get data on sent received bytes. In the post he ran : time yes|nc -v -v -n 192.168.0.8 2222 >/dev/null than ...
1
vote
2answers
470 views

Using nc.exe (NetCat) to send emails to secured SMTP server (TLS)

I used to send emails to unsecured SMTP servers using nc.exe utility (Windows port of NetCat) and now I need to send the same emails to a secured SMTP server (TLS). What additional parameters do I ...
0
votes
1answer
384 views

Banner Grabbing DNS? [closed]

How does one banner grab DNS? I'm able to banner grab other services such as HTTP/FTP/SMTP but for DNS it's not immediately obvious. Typically for HTTP I use nc with HEAD / HTTP/1.1 {ENTER}{ENTER}. ...
0
votes
1answer
290 views

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 ...
3
votes
1answer
1k views

What is the purpose of netcat's “-w timeout” option when ssh tunneling?

I am in the exact same situation as the person who posted another question, I am trying to tunnel ssh connections through a gateway server instead of having to ssh into the gateway and manually ssh ...
2
votes
2answers
237 views

How do I log tls-encrypted smtp traffic?

I'd like to know what my local postfix says to the Amazon SES smtpd after the STARTTLS. In plain text, so I can understand it. Amazon SES requires TLS, so I can't temporarily turn it off. I currently ...
2
votes
2answers
775 views

Examining Multiple Ports When Running NetCat (nc)

I am looking to test if specific ports are on a host are open. I am using: nc -z host 22 nc -z host 80 nc -z host 443 nc -z host 8080 which works, but it would be nice to use a one-liner like: nc ...
1
vote
1answer
416 views

Netconsole not working

I've gotten netconsole setup on a server that's been having a variety of kernel panics lately and I'm trying to log kernel messages to another server. I've tested netconsole after setting it up on the ...
0
votes
1answer
796 views

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 ...
5
votes
5answers
7k views

Netcat (nc) traditional package for RHEL 6.x?

I'm trying to use the Percona Apache Monitoring [Cacti] Template for Memcached. They do indeed warn that you can't use the openbsd version of the package and provide a solution for Ubuntu/Debian ...
2
votes
2answers
2k views

Netcat UDP File Transfer?

Is there any way to send a file (picture or video) using Netcat and UDP. It defaults as TCP, but I would like to send using UDP. I tried simply adding -u to the nc command, but that didn't work. Here ...
0
votes
3answers
402 views

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 ...
1
vote
3answers
278 views

What is Juniper's equivalent to netcat/nc command?

On Linux there is a nice tool for testing connections, bandwidth, opening temp. connections etc: nc What is equivalent on Juniper firewalls?
2
votes
1answer
188 views

quick check of open port

The following is working as expected. (do not want to use nmap) I need to use nc (or any other built-in centOS) command in shell script to check the port 6379 of a remote server. I want the script to ...
2
votes
5answers
4k views

echo server with netcat or socat

I want a UDP echo server to get packets, and reply exactly what it has received. How can I simply do this using netcat or socat? It should stay alive forever and handle packets coming from several ...
0
votes
1answer
159 views

Communication problems on secondary interface tap0

I am using UDP over ipv6 as communication stack. I have network client running on secondary virtual interface tap0. It generates messages for server which is supposed to run on the same interface but ...
1
vote
3answers
879 views

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. ...
0
votes
3answers
214 views

apache vhost not working consistently

I have a vhost on my webserver whose sole and unique goal is to return the client IP adress: petrus@bzn:~$ cat /home/vhosts/domain.org/index.php <?php echo $_SERVER['REMOTE_ADDR']; echo "\n" ?> ...
0
votes
1answer
916 views

Using netcat in windows to forward a tcp door to another machine

I have a computer with windows 7 under a firewall which can only initiate connections to other computers. It has a proxy server on it (port 9000) and I want to forward it to another machine ...
0
votes
1answer
265 views

Netcat to automate SpeedTouch administration

I figured out how to enable/disable my wireless connection with telnet, but I want to automate it. I read telnet is not suitable for this, and one should use netcat instead. This is what I have: nc ...
1
vote
1answer
399 views

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. ...
1
vote
2answers
100 views

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 ...
1
vote
1answer
2k views

Netcat - Listen for Multiple UDP Connections

I'm trying to use netcat to debug SIP calls, which communicate over UDP. Is there a way to get the same netcat instance to listen to multiple UDP Connections? I've tried connecting to the same netcat ...
2
votes
2answers
672 views

Netcat, Syslog, UDP, and <134>

Listening with netcat on UDP 514 to syslog data I see that each sent log message is separated by <134>. Does anyone note what <134> is?
0
votes
1answer
1k views

How do I test HTTP Pipelinning?

I am trying to test if site/server/whatever has ability to pipeline HTTP request. So far, I think it is possible to send several request through one curl session, like: curl ...
2
votes
1answer
490 views

Netcat / nc on ec2… public/private address?

I'm trying to use nc to debug some network issues (but am sort of ending up debugging nc itself). I have the relevant port open (to the world) in the ec2 security group. When I run either of these ...
2
votes
1answer
825 views

Can I use netcat as a lightweight web-server that will save post data as a file?

I know that netcat can be used as a lightweight web-server to host a file, but I want to also have any post data saved to a separate file. Is this possible with netcat? What's the lightest way I can ...