LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How to protect my dedicated server and websites ? (https://www.linuxquestions.org/questions/linux-security-4/how-to-protect-my-dedicated-server-and-websites-331540/)

my-unix-dream 06-08-2005 09:28 AM

How to protect my dedicated server and websites ?
 
I want to rent a dedicated server from web hosting company(red hat 9.0,cpanel,lamp)and of course manage 247 services included.but somehow i still need to install 3rd party software,add ons,my choice of software by myself and i never have experience admin linux server.

i want to install webmin,openwebmail,game server script.....cgi.....from ssh ? telnet ? or other way ?
how do i create my personal account from being rooted or better secure method ??to upload files and install them ?

how to protect server from internet cracker and avoid to be hacked ??change contents of websites ?

what is difference from sudo,su,and being rooted account ??how to procure ?

thanks
:newbie:

Artanicus 06-08-2005 10:48 AM

there is no simple answer to your questions, but Ill try to give you useful ideas.. (:

Dedicated server, all yours I presume? So, do they install the OS for you and keep it in shape, or is that your job? Is Red Hat the distro of your choise (I hope youre not considering 9.0 seriously, its getting realy old you know..), or does the hosting company mandate Red Hat? These are just questions for you to think about and be sure.. (;

When set up, the majority of a linux distro will run fine by itself, aslong as you first set up a decent configuration for them. Red Hat I beleive delivers something like that out of the box, but cant vouch on that. What youll actually be doing, is installing the 3rd party software you need, updating them, and updating your distribution.

As the server will be out of your physical proximity, the only real way you can admin it is over ssh and webmin. Dont even think about telnet, disable that rightaway. Filetransfers you can do over secure shell copy (scp) or ftp (not recommended if you want absolute security, if you dont use ftp, disable it, and in so doing, you colose a possible-"great security threat").

"Rooting" is usually used as a term of gaining un-authorized root access (root is the master user of a unix system, basicly can do anything). The only real way to be safe from it, is to keep your system updated. If its very important to you, keep track of security sites like secunia.. If you see a vunerability that affects your software, update to a newer version or patch it.

Seriously, the most important thing, is to be up to date. That means, you dont have Red Hat 9 on a machiner, but instead RHEL 4 or Fedora Core 3, or any other newer linux distribution like Slackware 10.1 or Debian 3.1.. Newer packages have older issues fixed, thus giving you protection against that vunerability. Simple, aint it? (:

And then the different commands. 'su' comes from either Switch User or Super User, its an ongoing dispute which it is (switch user prolly.. (;). In practice it is a command you use to switch from user to another. (doh) Heres an example that will clarify:
Code:

artanicus@mymachine $ su
[enter root password]
root@mymachine # exit
artanicus@mymachine $ su anotheruser
[anotheruser's password]
anotheruser@mymachine $ su
[enter root password]
root@mymachine # su artanicus
artanicus@mymachine $ echo "See, aint it simple? (;"

edit: alomost forgot to mention. /etc/suauth is a nifty file to restrict who can use su. For eg, this is my restriction line from that file, restricting using 'su' to only the group 'trusted'.
Code:

ALL:ALL EXCEPT GROUP trusted:DENY

'sudo' is simply put, su do.. So, basicly by giving some users sudo rights to some commands, they can execute those commands as root, with their own password. Sudo is used in some distributions (for eg. Ubuntu) as a sort of replacement for root, to increase security. Sudo is a very large topic, and googling on it will reveal some nifty articles on it if your interested in learning more.


All times are GMT -5. The time now is 09:06 PM.