I didn't have any service to install only had to test the comunication.
A list of ports were given to me (more than the 5 shown below).
I wrote a simple bash script to run on the servers.
I used a bash for to start all the ports with nc:
for PORT in 80 443 8443 8000 8443 2303
do
sudo nc -l $PORT > $PORT.log &
done
So now we have a bunch of LISTEN sockets:
netstat -an
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 *.2303 *.* LISTEN
tcp4 0 0 *.8000 *.* LISTEN
tcp4 0 0 *.8443 *.* LISTEN
tcp4 0 0 *.8443 *.* LISTEN
tcp4 0 0 *.443 *.* LISTEN
tcp4 0 0 *.80 *.* LISTEN
[...]
Now we can test the connectivity with netcat from another machine.
I wrote another script to do this that uses the first parameter given as target host:
for PORT in 80 443 8443 8000 8443 2303
do
export RESULT=`nc -G 1 -v $1 $PORT`
echo $1":"$PORT " RESULT: "$RESULT >> $1.log
done
This script outputs some lines like these:
10.10.200.10:80 RESULT: found 0 associations found 1 connections: 1: flags=82
10.10.200.10:443 RESULT: found 0 associations found 1 connections: 1: flags=82
So If you found an output in the [IP_ADDRESS]
[IP_ADDRESS]
Means the connection works.
The scripts are really raw, but are a good starting point.