Showing category "System Admin" (Show all posts)

How to set chattr attribute on a file

Posted by Mohamed Adam on Tuesday, September 6, 2011, In : System Admin 

How to set chattr attribute on a file


The following post explains how to set ch attribute on a file. 
root@me [~]# chattr +i /etc/fstab
root@me [~]# lsattr /etc/fstab
----i--A----- /etc/fstab
root@me [~]# chattr -i /etc/fstab

root@me [~]# lsattr /etc/fstab
-------A----- /etc/fstab
root@me [~]#
The letters "acdijsuADST" select the new attributes for the files: append only (a), compressed (c), no dump (d), immutable (i), data journalling (j), secure deletion (s), no tail-merging (t), undeletable (u),no ...

Continue reading ...
 

How to allow only one ip accessing the server through ssh

Posted by Mohamed Adam on Tuesday, September 6, 2011, In : System Admin 

How to allow only one ip accessing the server through ssh


This post explains how to block all ips except one accessing your system through ssh. Here we are using iptables firewall for blocking and allowing  ips. These rules are tested on Centos linux and will work with other linux distros like redhat, fedora, etc.

Suppose you have your main server with ip 192.168.1.10
And you want to allow access from 192.168.1.4 only

Here is the rules :
Initial state [all accept]

root@test [~]# iptables -L
Chain IN...

Continue reading ...
 

What is the use of screen command in linux? How to use it?

Posted by Mohamed Adam on Tuesday, September 6, 2011, In : System Admin 

What is the use of screen command in linux? How to use it?


What is the use of  screen command in linux? How to use it? The following post explains it.
Screen is a powerful tool useful for working in a remote environment. You can start a screen and execute the commands inside the screen. So even if the connection goes down between your system and remote system, you can later attach to the screen. The command will be working inside the screen. 

Installation:
#yum install screen

#screen
Then execute t...

Continue reading ...
 

Websites each system admin should know

Posted by Mohamed Adam on Tuesday, September 6, 2011, In : System Admin 

Websites each system admin should know


To know your public ip. It shows location and other details too.
http://whatismyipaddress.com/

For checking nameservers, mx record, A record, PTR record and other DNS details.
http://www.intodns.com/

Example:
http://www.intodns.com/randeeppr.me

For checking the accessibility of your ip address or url. It gives ping results from many parts of the world.
http://www.just-ping.com/

For checking the domain details such as owner of the domain and contact details.
http:/...

Continue reading ...
 
 

Recent Posts