Monday, February 6, 2012

How To Block Only Services

One biggest security option some time as a server administrator you are thinking can not access via SSH or TELNET services in your system and you can say server system. Some personal documents in server machine and also services. I can understand if you are as a server administrator and you want to secure your system. So what to do you are login through user ya it's good but you are login through user then go to super user. Some time you want to changes like some file on the server it's very urgent so you need to login your system so what your choice login with user and super user i know super user. Again security issue then do this it's very simple i hope you like it.

Follow this step

You want to block like SSH open hosts.deny file define the SERVICE name and IP address
  • [root@linuxserv1 ~]# vim /etc/hosts.deny
 EXAMPLE:-  
[ servicename: <TAB> IP address or Network address ]
sshd: 192.168.0.                  {like this}

Then save the file.
  • [root@linuxserv1 ~]# service sshd restart
Done this configuration on server machine now try to ssh through another machine..


***Enjoy the magic***

Favorites