easy port test with optional webserver

Jan 23, 05:49 AM

## Easy Port Testing

## ON SERVER:

dnf --assumeyes install nmap net-tools ; ## in case this has not yet been installed!
systemctl stop firewalld.service ; ## or make the particular port available!
ls -l | /usr/bin/ncat --listen 10000 ;
date | /usr/bin/ncat --listen 3030 ;
<>
  1. https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/
    lsof -i -P -n | grep LISTEN ; ## make sure ports are listening
    netstat -tulpn | grep LISTEN ; ## another way to make sure ports are listening

## ON CLIENT:

just type cmd, and enter ‘telnet’ – this may be necessary: Enable telnet on windows-11 and REBOOT — 2024-10-01

telnet 123.123.123.123 10000 ; ## should give us the directory (or date) and then the ncat command on the server STOPS
  1. NOTICE ONLY ONE SPACE BETWEEN IP ## and PORT ### !! (this might just be a m$ thing)

## working fake webserver test:

https://jameshfisher.com/2018/12/31/how-to-make-a-webserver-with-netcat-nc/

these did NOT work for me:

(this one requires ‘screen’ whatever that is)
https://support.cpanel.net/hc/en-us/articles/4403282341143-How-to-use-ncat-netcat-as-a-mini-webserver-to-diagnose-network-connectivity-related-issues

https://stackoverflow.com/questions/16640054/minimal-web-server-using-netcat

Mark Edwards

,

---

Commenting is closed for this article.

---