Linux port creating / testing


Wanted to test Oracle Apex on port 8080 (default) but was not 100% sure Apex was running correctly or the firewall from the cloud was not blocking the port.

The "nc" command can run the port and you can test without having the app running -

[root@test ~]# nc -l 8080 -v

Ncat: Version 7.50 ( https://nmap.org/ncat )

Ncat: Listening on :::8080

Ncat: Listening on 0.0.0.0:8080




This is particularly handy as the  Oracle cloud servers have no web browser graphical output (OCI Linux ones anway - as far as I know) so not like you can fire up a web browser and connect that way.

Example of port testing -

[root@tst01]# ncat -z -v tst02.oci.nwl.co.uk 3872

Ncat: Version 7.50 ( https://nmap.org/ncat )

Ncat: Connection timed out.

[root@tst01]# ncat -z -v tst03.oci.nwl.co.uk 3872

Ncat: Version 7.50 ( https://nmap.org/ncat )

Ncat: Connected to 10.157.249.4:3872.

Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds.