-
Notifications
You must be signed in to change notification settings - Fork 0
New Server Setup
whey edited this page Mar 23, 2012
·
18 revisions
##Base configuration cheat sheet. This is meant for educational purposes and should not be used to deploy in a commercial environment. This information here is collective and is based on personal knowledge as well as knowledge gathered from various open sources.
These controls are in regards to CentOS 6.
Create a group and set its configurations
- 1 open visudo
sudo /usr/sbin/visudo- 2 create the group and set its privileges
note: this setting below is strongly suggested for sudo users only as it gives all privileges to the username and access to superuser.
## Allows people in groupname to run all commands
%groupname ALL=(ALL) ALLAdding the user and setting it to a group
/usr/sbin/adduser username
passwd username
/usr/sbin/usermod -a -G groupname usernamenano /etc/ssh/sshd_configAllows you to configure and save iptables.
nano /etc/iptables.up.rules
/sbin/iptables -F
/sbin/iptables-restore < /etc/iptables.up.rules
/sbin/service iptables save- 1
# vi /etc/profile.d/autologout.sh- 2
TMOUT=300
readonly TMOUT
export TMOUT- 3
chmod +x /etc/profile.d/autologout.sh- 4
service sshd restart