Q.) How can you see total TCP Connections count on your linux system ?
Q.) How can you make your Linux server reboot automatically when the kernel enters panic mode ?
Q.)How will you deny IPv4 traffic over TCP from host 172.168.2.0 to port 22 in your linux VM ?
Bonus Q. ) How can you do the same using ansible playbook ?
Level - L2 and above.
I'll be posting a series of Linux-related questions covering various skill levels. Feel free to share your insights and expertise. Your contributions will benefit learners at all stages, from those in current roles to those preparing for Linux interviews.
In response to Question 1; the following command will show all listening and non-listening TCP connections on the current host:
ss -at
To get the count you could pipe the output through wc and subtract one (1) for the newline.
@Ad_astra thanks for the answer!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.