1. A method of automated configuration of a security gateway, the method comprising: a) setting-up an initial rule-set; b) obtaining log records of communication events corresponding to the initial rule-set so as to obtain a sufficient amount of log records; c) transforming the obtained log records into respective rules, wherein source, destination and service fields in each rule correspond to source, destination and service values in respective obtained log record, and the action in all rules is defined as “Accept”, thus giving rise to a transformation-based rule-set; and d) processing the transformation-based rule-set so as to generate an operable rule-set.