Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jun 24, 2012 9:37 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
Hello Everybody,

CentOS 5.6 - 64-bit
Apache web server with My Sql

The web application and My Sql servers are installed on different servers for load sharing and are connected to together and is in the same data center.

Below is the current firewall configuration, would appreciate if you could tell me if these settings are sufficient to ensure my servers are secure.

# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT esp -- anywhere anywhere
ACCEPT ah -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT tcp -- anywhere anywhere tcp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited


Thanks,
Avinash


Top
   
PostPosted: Sun Jun 24, 2012 10:57 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
No, firewalls are not sufficient to ensure a system is secure. If anything is going to get you, it's probably going to be coming in via port 80.

Anyway, from the looks of things, you're allowing Internet Printing Protocol as well as FTP. Both of those are not generally things you'd want to run on a remote server. mDNS is also of limited utility on a public cloud. Those are the three rules I'd probably remove from the RH-Firewall-1-INPUT chain.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Sun Jun 24, 2012 3:20 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
CentOS 5.8 has been out since March 2012, I'd worry as much about keeping your security patches up-to-date as well as pruning your IPTABLES.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Tue Jun 26, 2012 10:17 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
Yeah, I understand firewall is not the only solution. Would appreciate if you share with me other methods to secure the server. I cannot block Port 80 as it is a web application. Even SSL is configured to work through port 80.

I hope removing FTP, IP and mDNS won't disturb access to the website?


Thanks.

hoopycat wrote:
No, firewalls are not sufficient to ensure a system is secure. If anything is going to get you, it's probably going to be coming in via port 80.

Anyway, from the looks of things, you're allowing Internet Printing Protocol as well as FTP. Both of those are not generally things you'd want to run on a remote server. mDNS is also of limited utility on a public cloud. Those are the three rules I'd probably remove from the RH-Firewall-1-INPUT chain.


Top
   
PostPosted: Tue Jun 26, 2012 10:18 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
Yes you are right, keeping the OS updated will help.

vonskippy wrote:
CentOS 5.8 has been out since March 2012, I'd worry as much about keeping your security patches up-to-date as well as pruning your IPTABLES.


Top
   
PostPosted: Tue Jun 26, 2012 6:21 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
mDNS and IPP are not used for web hosting and are mostly "LAN" protocols used within controlled environments. FTP is also not generally used for web hosting, although it is a legacy protocol used for file transfer in many places it shouldn't be.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Thu Jun 28, 2012 8:55 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 568
Website: http://www.mattnordhoff.com/
Avinash.Rao wrote:
Even SSL is configured to work through port 80.

Wait what? Why would HTTPS be on anything but port 443?

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
PostPosted: Sat Jun 30, 2012 8:48 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
I am sorry that was typo. Please read that as 443.


mnordhoff wrote:
Avinash.Rao wrote:
Even SSL is configured to work through port 80.

Wait what? Why would HTTPS be on anything but port 443?


Top
   
PostPosted: Sat Jun 30, 2012 8:50 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
This mean I got to remove the mDNS, IPP and FTP.

Is there anything that I need to do?

Thanks for your time.



hoopycat wrote:
mDNS and IPP are not used for web hosting and are mostly "LAN" protocols used within controlled environments. FTP is also not generally used for web hosting, although it is a legacy protocol used for file transfer in many places it shouldn't be.


Top
   
PostPosted: Sat Jun 30, 2012 8:51 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 26, 2011 7:43 am
Posts: 59
I don't receive email notifications despite subscribing for this thread.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group