Linux Security Configuration

Posted on May 14, 2008
Filed Under Linux, Security |

1. Use firewall to close unused ports:

1) At the command prompt, type the following line:

echo 1 > /proc/sys/net/ipv4/icmp_ignore_all

2) Use firewall to prohibit (or discarded) icmp package:

iptables -A INPUT -p icmp -j DROP

3) Change the SSH portmost , which is preferably more than 10,000:

vi /etc/ssh/sshd_config

4) Create common users and disable direct root login

useradd ‘username’

passwd ‘username’

vi /etc/ssh/sshd_config

Insert the following sentence in the end:

PermitRootLogin no

5)Changes following file permissions, so that nobody can change the account privileges:

chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/group
chattr +i /etc/gshadow

Tags: ,

If you enjoyed this post, make sure you subscribe to my RSS feed!

Comments

Leave a Reply