Testing TCP/UDP baseline functionality with Netcat & Curl through CLI(SSH)

Here I am showing how to setup a simple Netcat listening server to test baseline functionality of TCP/UDP connections. I create a simple document and save it as technical.txt that I will send to my server I am testing.

Here I create the simple document.

On the server for phub.info I setup a Netcat listener at port 8888 that is ready to receive the specific document. 



Now from the 'HQ-cloud-green' server I get ready to receive the document with another Netcat server.


To confirm receipt of the file I open it and view the contents from the terminal.
Great so now I can send messages back and forth but I want to test things a little further. I want to know how this connection port and the data being sent through it will be interpreted by browsers. With Netcat I can create a simple HTTP server to serve up content to browsers to see if my server is configured correctly. Here I pulled the data from the URL with cURL and you can see the HTML for the test page I am serving from the Netcat server.


And now when I visit port 8888 at my IP for phub.info (this is just a cloud droplet I spun up and destroyed after this example) I get the following output below and can confirm correct functionality of TCP & UDP.


Comments