fix this problem, following this tutorial from
https://askubuntu.com/questions/932557/how-to-listen-new-port-ubuntu-server-from-command-line
most easiest way, in my opinion, is to create systemd unit. For this purpose:
Create /etc/systemd/system/listen-3000.service:
sudo nano /etc/systemd/system/listen-3000.service
As content of /etc/systemd/system/listen-3000.service place:
[Unit]
Description=Permanent listen at :::3000
After=network-online.target
[Service]
User=root
ExecStart=/usr/bin/nc -l6 3000
ExecStop=/usr/bin/killall -s KILL nc
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
Enable and start the listen-3000.service:
sudo systemctl daemon-reload
sudo systemctl enable listen-3000.service
sudo systemctl start listen-3000.service
sudo systemctl status listen-3000.service
Disable and stop the listen-3000.service:
sudo systemctl stop listen-3000.service
sudo systemctl disable listen-3000.service
