Friday, November 12, 2021

Checking ports with telnet or netcat

 Recently I was working on AWS and was deploying applications on a Fargate cluster. I wanted to make sure the application was up and running and the ports were accessible by other applications. For that purpose I created a bastion host (EC2) but because of the restrictions on my role, I could not install telnet or nc on that EC2 instance. 

But I was able to connect to the ports using the below bash command

</dev/tcp/10.191.226.250/13133 && echo Port is open || echo Port is closed


Blog Archive