Question & Answer
Question
Using netcat to ascertain if a particular port is open between sender and receiver
Answer
The utility netcat can be used to ascertain if a particular TCP or UDP port is open between two endpoints. This can be extremely useful for determining whether a connection can be made between an Aspera client and server.
Obtaining netcat
- Windows: Download from http://joncraton.org/media/files/nc111nt.zip (password for the archive is "nc")
- Linux/Unix: Install netcat from your usual package manager for example with CentOS:
yum install netcat
Instructions
Ensure netcat is available on both computers you are testing with.
First, set up one computer to be the "listener" listening on a specific port. Then try to connect to the listening computer on the same port from the other computer.
STEP 1
- Connect to both local and remote computer. Make sure the netcat files are present on both computers.
STEP 2
- On your Aspera server open up a command prompt and navigate to the directory with netcat. Then type in:
nc -l -u -p 33001
-l means it should listen -u that it should use UDP and -p specifies the port.
STEP 3
- Now try and connect from the remote machine. Open up a command prompt and navigate to the directory with netcat. Use the following command where ip_address is the IP address of your Aspera server:
nc -u ip_address 33001
STEP 4
- If the connection was successful you can type something on the remote machine and will see the same echoed on the listening machine.
- If the port is blocked you will be able to type something on the remote machine but you will not see anything appear on the listening machine.
STEP 5 (optional)
- Try netcat with a port you know works and is open just for verification. For example to test TCP/33001:
nc -l -p 33001 # on the listening servernc ip_address # 33001 on the remote machine
Related Information
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS8NDZ","label":"IBM Aspera"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
Modified date:
01 April 2021
UID
ibm10746357