[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: easiest way to shut down all network services besides ssh?



On Jo, 18 dec 14, 00:37:30, The Wanderer wrote:
> 
> If you want to transform your current system by removing
> externally-accessible services, I don't know of a strictly "easy" way,
> but if I wanted to do that on a machine under my control, what I'd do
> is:
> 
> * Get a list of open ports by running 'nmap localhost' (or by running
>   nmap against the system from a different machine, which might give
>   more reliable results).
> 
> * Do some guesswork against the installed package list to figure out
>   what might be opening each of the listed ports.
> 
> * Remove all of those packages except for the chosen SSH server package.
> 
> The guesswork is the difficult part, and although it doesn't seem
> terribly difficult from my end when I do a trial run (omitting the final
> "remove" part) on my own system, I can imagine that it could easily
> enough be more difficult under your circumstances. I don't have any good
> suggestions for how to make it any easier.

'netstat -plant' will show the executable responsible for opening the 
port and 'dpkg -S' can tell you to which package it belongs.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt

Attachment: signature.asc
Description: Digital signature


Reply to: