Bug 462603 - Tighten firewall rules
Tighten firewall rules
Status: CLOSED CURRENTRELEASE
Product: Red Hat HPC Solution
Classification: Red Hat
Component: kusu-base-installer (Show other bugs)
5.1
All Linux
high Severity high
: ---
: ---
Assigned To: OCS Support
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-17 09:53 EDT by Daniel Riek
Modified: 2009-06-08 09:12 EDT (History)
1 user (show)

See Also:
Fixed In Version: ocs-5.1-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-29 15:08:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Riek 2008-09-17 09:53:12 EDT
The current firewall rules for the HPC Solution have the following
catch-all rules in the INPUT part:
  
        for dev in private_nics:
            filter += '-A FORWARD -i %s ' % dev + \
                      '-o %s -m state ' % public + \
                      '--state RELATED,ESTABLISHED -j ACCEPT\n'
            filter += '-A FORWARD -i %s -j ACCEPT\n' % dev
            filter += '-A INPUT -i %s -j ACCEPT\n' % dev
        filter += '-A INPUT -i lo -j ACCEPT\n'
        filter += '-A INPUT -p icmp --icmp-type any -j ACCEPT\n'
        filter += '-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT\n'
        filter += '-A INPUT -i %s -p tcp --dport 0:1024 -j REJECT\n' % public
        filter += '-A INPUT -i %s -p udp --dport 0:1024 -j REJECT\n' % public

That leaves ports higher than 1024 available for remote connections from
public networks. We think that that is dangerous and we would prefer the
last two to be consolidated into one much stricter rule:
        filter += '-A INPUT -i %s -j REJECT\n' % public

Also there would be need for additional rules to open the public ports used by ntop, cacti, or nagios, etc.
Comment 1 OCS Support 2008-09-18 11:58:56 EDT
The code has been changed to replace the last 2 reject rules with the alternate i.e.
-        filter += '-A INPUT -i %s -p tcp --dport 0:1024 -j REJECT\n' % public
-        filter += '-A INPUT -i %s -p udp --dport 0:1024 -j REJECT\n' % public
+        filter += '-A INPUT -i %s -j REJECT\n' % public

The solution will be available in kusu-base-installer 5.1-28 or better
Comment 2 OCS Support 2008-09-29 09:26:52 EDT
Fix has passed QA

Note You need to log in before you can comment on or make changes to this bug.