{"id":7876,"date":"2019-06-20T09:14:52","date_gmt":"2019-06-20T01:14:52","guid":{"rendered":"http:\/\/rmohan.com\/?p=7876"},"modified":"2019-06-20T09:14:54","modified_gmt":"2019-06-20T01:14:54","slug":"how-to-create-a-tcp-listener-or-open-ports-in-unix-os","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7876","title":{"rendered":"How to create a TCP listener or open ports in unix os"},"content":{"rendered":"\n<p>You can create a port listener using Netcat .<\/p>\n\n\n\n<p>yum install nc -y <\/p>\n\n\n\n<p>root@rmohan:~# nc -l 5000<br>\nyou can also check if port is open or not using netstat command .<\/p>\n\n\n\n<p>root@vm-rmohan:~# netstat -tulpen | grep nc<br>\ntcp        0      0 0.0.0.0:5000             0.0.0.0:*               LISTEN      0          710327      17533\/nc<br>\nyou can also check with nc :<\/p>\n\n\n\n<p>Netcat Server listener :<\/p>\n\n\n\n<p>nc -l localhost 5000<br>\nNetcat Client :<\/p>\n\n\n\n<p>root@vm-rmohan:~# nc -v localhost 5000<br>\nConnection to localhost 5000 port [tcp\/*] succeeded!<\/p>\n","protected":false},"excerpt":{"rendered":"\n<p>You can create a port listener using Netcat .<\/p>\n<p>yum install nc -y <\/p>\n<p>root@rmohan:~# nc -l 5000 you can also check if port is open or not using netstat command .<\/p>\n<p>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 :<\/p>\n<p> [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7876"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7876"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7876\/revisions"}],"predecessor-version":[{"id":7877,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7876\/revisions\/7877"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}