It would be useful, to know which ports are active and if you click on that port you close it.
I tried doing something similar to get a list of ports:
netstat -Watnlv | grep LISTEN | awk '{"ps -ww -o args= -p " $9 | getline procname; print $4 }' | grep '[*]' | sort -u | sed "s/*.//"
Then via this output, you should create a choice menu that clicking closes the door.
sudo lsof -t -i tcp:Port | sudo xargs kill
@sindresorhus : Do you think it could be useful?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too