This is a simple modbus/TCP server for test purpose, write in pure Perl code.
git clone https://github.com/sourceperl/mbserverd.git
cd mbserverd
perl Makefile.PL
make
sudo make install
sudo mbserverd
sudo killall mbserverd
sudo netstat -ntap
Connexions Internet actives (serveurs et établies)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 0.0.0.0:502 0.0.0.0:* LISTEN 3973/perl <- it's modbus server
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2072/sshd
mbserverd -h
sudo apt-get install supervisor
sudo cp etc/supervisor/conf.d/* /etc/supervisor/conf.d/
sudo supervisorctl update