Ports that must be open to run cPanel behind a firewall:
* 20 — ftp tcp inbound/outbound
* 21 — ftp tcp,udp inbound/outbound
* 22 — ssh tcp inbound
* 25 — smtp tcp inbound/outbound
* 26 — smtp tcp inbound/outbound
* 37 — rdate tcp outbound
* 43 — whois tcp outbound
* 53 — DNS tcp/udp inbound/outbound
o (inbound is only needed if you run your own public DNS server)
* 80 — http tcp inbound/outbound
* 110 — pop3 tcp inbound
* 113 — ident tcp outbound
* 143 — imap4 tcp inbound
* 443 — https tcp inbound
* 465 — smtp tls/ssl tcp/udp inbound/outbound
* 873 — rsync tcp/udp outbound
* 993 — imap4 ssl tcp inbound
* 995 — pop3 ssl tcp inbound
* 2077 — webdav tcp/udp inbound/outbound
* 2078 — webdav ssl tcp/udp inbound/outbound
* 2082 — cpanel tcp inbound
* 2083 — cpanel ssl tcp inbound
* 2086 — whm tcp inbound
* 2087 — whm ssl tcp inbound
* 2095 — Webmail tcp inbound
* 2096 — Webmail SSL tcp inbound
* 3306 — mysql tcp (only if you need to connect remotely)
* 6666 — chat tcp inbound
Informations: Allowing the root user to login directly is a major security issue, we’ll show you how to disable it so you can still login as root but just not directly, reducing the security issue. -------------------------------------------------------------------------------- This will force a hacker to have to guess 2 seperate passwords to gain root access. (you do have 2 seperate passwords for admin and root right?) What happens is you’ll first need to login as your admin user in SSH, then switch to the super user with the su command to get root. We also will be forcing the use of SSH protocol 2, which is a newer, more secure SSH protocol Just a couple more ways to help your server stay safe from the bad guys. If you’re using cPanel make sure you add your admin user to the ‘wheel’ group so that you will be able to ’su -’ to root, otherwise you may lock yourself out of root. 1. SSH into your server as ‘admin‘ and gain root access by su 2. Copy and paste this line to edit the file for SSH logins pico -w /etc/ssh/sshd_config 3. Find the line Protocol 2, 1 4. Uncomment it and change it to look like Protocol 2 5. Next, find the line PermitRootLogin yes 6. Uncomment it and make it look like PermitRootLogin no 7. Save the file Ctrl+X then Y then enter 8. Now you can restart SSH /etc/rc.d/init.d/sshd restart Now, no one will be able to login to root with out first loggin in as admin and ’su -’ to root, and you will be forcing the use of a more secure protocol. Just make sure you remember both passwords!
Posted by Unknown at 16:56
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment