How to turn off linux ports?
In some Linux distributions, there is a file named “/etc/inetd.conf”. inetd is such a procession that monitors the requirement from the network,and call the corresponding program to done with them. “inetd.conf” tells the inetd procession which ports should be listened, and what service should be started for these using ports.
So, we could turn off the ports just adding “#” before the line indicated the port in “inetd.conf” file. and then send out “SIGHUP” to inetd. For all doing:
1. # chmod 600 /etc/inetd.conf
2. idenfity the owner is root:
# stat /etc/inetd.conf
3. # vi /etc/inetd.conf
4. # killall -HUP inetd
after the above steps, we must set the “inetd.conf” to be un-changed.
5. $ chattr +i /etc/inetd.conf
Check the local network setting:
# cat /etc/sysconfig/network