LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to close some ports? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-close-some-ports-527777/)

gubak 02-12-2007 06:35 AM

How to close some ports?
 
Hi

I have many open ports and I want to close some of them, but don't know how? You have to know, that I use iptables as packet filtering.

So my question is:

What command do I need or what file do I have to edit to close a port (for example port 6000 X11) ?

Thank you

Nick_Battle 02-12-2007 06:45 AM

In general, you need to find the service that is using the port and configure your system not to run that service. How you do that depends on your distribution and the service concerned.

In the particular case of the X11 port, you need to change the configuration of the X Server to include the option "-nolisten tcp" I think. Again, how you do this depends on your distribution, but you can usually pass options to startx or xinit.

HTH.


All times are GMT -5. The time now is 01:32 AM.