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
2
votes
2 answers

How do I get netcat to accept connections from outside the LAN?

I'm using netcat as a backend to shovel data back and forth for a program I'm making. I tested my program on the local network, and once it worked I thought it would be a matter of simply forwarding a port from my router to have my program work over…
Chris
2
votes
1 answer

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: Version 7.70 ( https://nmap.org/ncat ) Ncat:…
Sandra
  • 10,303
  • 38
  • 112
  • 165
2
votes
1 answer

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:password --proxy socks5.proxy.domain:1080 %h %p"…
ykaganovich
  • 149
  • 3
  • 8
1
vote
1 answer

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. # nc -v -u -w 3 localhost 10003 localhost…
skwokie
  • 165
  • 2
  • 9
1
vote
0 answers

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 of 'Connection Refused' but I still get…
ryan77627
  • 11
  • 3
1
vote
1 answer

My sysadmin is on vacation, Help!

I wanted to trouble shoot a certain issue on the server, but I could not connect my debugger since the person who maintains the firewall is off on a vacation. I dont want to mess with his settings. He has given me admin password though. So for my…
Senthil
1
vote
1 answer

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 Dload Upload Total …
1
vote
2 answers

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 Windows with Plink 0.70 + Ncat 7.70…
Kenny Parker
  • 11
  • 1
  • 5
1
vote
0 answers

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, when clients try to connect through the proxy, some (but…
user422391
1
vote
1 answer

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 of an actual mkfifo buffer because the data will…
skyler
  • 465
  • 3
  • 8
  • 17
1
vote
1 answer

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 /dev/tcp nor /dev/udp. Here…
intore
  • 121
  • 3
1
vote
0 answers

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 specific host so I can for example bash…
1
vote
1 answer

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. The interfaces ips that I have in each machine…
Ozzy
  • 15
  • 4
1
vote
3 answers

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 its output based on the word LISTENING (for…
Polentino
  • 113
  • 3
1
vote
3 answers

Synchronous serving with netcat

This command will persistently serve its output--all hits from today on an apache server--to a browser, via netcat: while true; do grep `date +%d\\/%b` /var/log/apache/access.log | nc -q1 -l -p8080; done This is super-cool, but I have one pet-peeve…
Max Cantor
  • 121
  • 3