Page MenuHomePhabricator

Ferm rules for ocg hosts
Closed, ResolvedPublic

Description

The basic approach is that including base::firewall to a host in site.pp enables a set of basic firewall rules which drop incoming connections by default. In addition the puppet classes of the services running on the host then need to whitelist their traffic.

Many services can be allowed using the ferm::service class:
https://doc.wikimedia.org/puppet/classes/ferm.html#M000641
More complex rules can be be implemented using the ferm::rule class.

First the traffic patterns/ports used by these classes need to be identified and ferm rules added to them:
role ocg

Once the ferm rules have been added, base::firewall can be included to the hosts which have ferm rules for all their services.

Event Timeline

MoritzMuehlenhoff raised the priority of this task from to Needs Triage.
MoritzMuehlenhoff updated the task description. (Show Details)
MoritzMuehlenhoff subscribed.
fgiunchedi triaged this task as Medium priority.Jul 20 2015, 2:28 PM
MoritzMuehlenhoff claimed this task.

The ocg* hosts are already covered (it was initially overlooked, since base::firewall is included in the role definition)

fgiunchedi subscribed.

reopening as we should be NOTRACKing connections made to port 8000 on the ocg service ip, at the moment there's been a lot of jobs enqueued to ocg and the connection track showed 80% full

tcp        0      0 10.2.2.31:8000          10.64.16.172:37360      TIME_WAIT   -               
tcp        0      0 10.2.2.31:8000          10.64.48.83:48120       TIME_WAIT   -               
tcp        0      0 10.2.2.31:8000          10.64.0.69:35383        TIME_WAIT   -               
tcp        0      0 10.2.2.31:8000          10.64.0.76:40360        TIME_WAIT   -

Change 233684 had a related patch set uploaded (by Muehlenhoff):
Exempt ocg service from connection tracking

https://gerrit.wikimedia.org/r/233684

Change 233684 merged by Muehlenhoff:
Exempt ocg service from connection tracking

https://gerrit.wikimedia.org/r/233684