#-----------------------------------------------------------------------------#
#    This file contains sample rules to filter and log HTTP URLs.             #
#                                                                             #
#    To activate the rules, simply move them to firerule.cnf and update the   #
#    attributes to match your setup.                                          #
#                                                                             #
#    DISCLAIMER: Not all samples have been tested by F/X Communications.      #
#-----------------------------------------------------------------------------#

#-----------------------------------------------------------------------------#
#                                                                             #
#    This rule performs plain logging of all outgoing HTTP URLs               #
#                                                                             #
#-----------------------------------------------------------------------------#

URL-Log                 Comment = "Log outgoing HTTP requests",
                        Offset = URL,
                        Rule-Action = Log,
                        Direction = Outgoing,
                        Destination-Port = "http",
                        Log-Control = Enabled,
                        Log-File = "firewall/logs/http.log",
                        Log-Mask = "date time source dest url",


#-----------------------------------------------------------------------------#
#                                                                             #
#    This rule logs all requests to www.fx.dk site. URL logging supports      #
#    the traditional wildcards: '*' and '?'.                                  #
#                                                                             #
#                                                                             #
#-----------------------------------------------------------------------------#

URL-Log-Selected        Comment = "Log all HTTP requests to www.fx.dk site",
                        Offset = URL,
                        Rule-Action = Log,
                        Direction = Outgoing,
                        Destination-Port = "http",
                        Hex-String = "http://www.fx.dk/*",
                        Log-Control = Enabled,
                        Log-File = "firewall/logs/http-fx.log",
                        Log-Mask = "date time source dest url",


#-----------------------------------------------------------------------------#
#                                                                             #
#    This rule denies all HTTP requests to sites containing the word          #
#    "advertisement".                                                         #
#                                                                             #
#-----------------------------------------------------------------------------#

URL-Filter-Adverts      Comment = "Deny HTTP requests containing 'advertisement' word. Useful for filtering banners.",
                        Offset = URL,
                        Rule-Action = Deny,
                        Destination-Port = "80",
                        Direction = Outgoing,
                        Hex-String = "*advertisement*",


#-----------------------------------------------------------------------------#
#                                                                             #
#    This rule filters all requests for .mp3 files                            #
#                                                                             #
#-----------------------------------------------------------------------------#

URL-Filter-MP3          Comment = "Deny HTTP requests for *.mp3 files",
                        Offset = URL,
                        Rule-Action = Deny,
                        Destination-Port = 80,
                        Direction = Outgoing,
                        Hex-String = "*.mp3",


