April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

How to create a TCP listener or open ports in unix os

You can create a port listener using Netcat .

yum install nc -y

root@rmohan:~# nc -l 5000
you can also check if port is open or not using netstat command .

root@vm-rmohan:~# netstat -tulpen | grep nc
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 0 710327 17533/nc
you can also check with nc :

Netcat Server listener :

nc -l localhost 5000
Netcat Client :

root@vm-rmohan:~# nc -v localhost 5000
Connection to localhost 5000 port [tcp/*] succeeded!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>