4 ms·
When installing a new machine one of the first things you should do is run netstat -tnlp | grep -v 127.0.0 | grep -v ::1: Then uninstall or reconfigure anyt
by ars 13y ago
When installing a new machine one of the first things you should do is run
netstat -tnlp | grep -v 127.0.0 | grep -v ::1:
Then uninstall or reconfigure anything that is listening remotely.
- dsr_ 13y agoThe problem is rarely at installation time. The problem is three years later, when you know that you've got rsync because it's so useful, but you don't remember that you left rsyncd running. Internal and external nmap sweeps: always a good idea* *If you don't own the network, get permission first.
- jimktrains2 13y agoIf you have system monitoring tools, then you could make on of the things it monitors a script that does netstat -plan | grep -v 127.0.0.1 | grep -v ::1 | grep -v ssh | grep -v <anything you know should be running> | wc -l
- ars 13y agoDon't use -a though :) Use -t to avoid listing local sockets. So -pltn not -plan
- Florin_Andrei 13y agoIt helps a lot if you just do a minimal install, and add components only on a need-to basis.
- ars 13y agoSometimes recommends will include things you don't actually need. Like rcpbind and nfs. So you still need to check after the install.
- sneak 13y agoI've always been a fan of lsof -n | grep LISTEN
- nisa 13y agoss -lnp