easy port test with optional webserver

Jan 23, 05:49 AM

## easy port test:

## ON SERVER:

dnf —assumeyes install nmap ; ## 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:

telnet 123.123.123.123 10000 ; ## should give us the directory (or date) and then the ncat command on the server STOPS

## 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.

---