LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2015, 03:57 AM   #1
callis07
LQ Newbie
 
Registered: Jul 2014
Posts: 15

Rep: Reputation: Disabled
netcat and nc commands not working in Red Hat Linux 6.4


Hello All,

I am trying to check a tcp/udp port from one server to another server using netcat and nc commands. As there is no manual entry in the system I am not able to check it.

Please let me know any commands are available for checking the port from one server to another server
 
Old 02-10-2015, 04:17 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Not sure what you mean by
Quote:
As there is no manual entry in the system
but a common tool to check a particular ip+port is the telnet client eg
Code:
telnet 1.2.3.4 80
 
Old 02-10-2015, 07:03 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,716

Rep: Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751
telnet only uses TCP. What is the exact nc command you are running?

To scan the port using TCP
nc -vz host port

To scan the port using UDP
nc -vzu host port

Replace host with the real host name or IP address. Replace port with the real port number.
 
Old 02-11-2015, 11:58 AM   #4
callis07
LQ Newbie
 
Registered: Jul 2014
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thanks guys for your answer.

When, I issues a command

man nc

No manual entry found

In server we don't have the manual entry for netcat and nc.
Wanted to know any specific/equivalent commands related to nc and netcat are available or not.
 
Old 02-12-2015, 03:35 AM   #5
callis07
LQ Newbie
 
Registered: Jul 2014
Posts: 15

Original Poster
Rep: Reputation: Disabled
Please let me know how to check the port from host to destination? I need something like this below

nc -vzu host destination port -- i see this is not working? Do we need to change the command?

From your example it is mentioned to scan only for host

To scan the port using TCP
nc -vz host port

To scan the port using UDP
nc -vzu host port
 
Old 02-12-2015, 05:16 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,716

Rep: Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751
You can find lots of help on the internet. Have you tried searching?

http://linux.die.net/man/1/nc

What do you mean by not working? Without posting specific error messages or output we have no idea as to the problem.

Run the same command from the other server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Commands not working in Red Hat Linux Enterprise 5 anis_huq Linux - Newbie 3 08-18-2009 11:33 PM
red hat 8 networking commands/help zeb_666 Linux - Networking 2 09-20-2004 12:41 PM
I need help getting a Netgear MA311 working on Red Hat Linux 9 Echs Bochs Linux - Wireless Networking 7 01-21-2004 07:19 PM
Help with Red hat 7.2 commands mrtwice Linux - Newbie 1 02-01-2002 10:55 PM


All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration