
So similar steps must be repeated to open the same port again after a restart. The approach presented in this article will only temporarily update the firewall rules until the system shuts down/reboots. This simulates such environments in a simple command.īut this is only temporary, as the changes will be reset every time we reboot the system. This is the reason why nc is such a useful tool.

Similarly, telnet won’t work either, since it also needs a listening application to bind to. But it is recommended to generate a new service in this case to make it more obvious that the service has been customized. If you don’t use any listening application such as netcat, this will display the port 4000 as closed, since there isn’t any application listening on that port currently. NOTE: nmap only lists opened ports which have a currently listening application.

Indeed, our port has been opened! We have successfully opened a new port on our Linux system!
