Endian Firewall Reference Manual R
Endian Firewall Reference Manual R
r. 2.2.1.9
Copyright (c) 2008 Endian srl, Italy.
Permission is granted to copy, distribute and/or modify this document under the terms of the
GNU Free Documentation License, Version 1.2 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU Free Documentation
License".
Index
A proxy is a service on your Endian Firewall that can act as a gatekeeper between clients (e.g.
a web browser) and network services (e.g. a web server on the internet). Clients connect to the
proxy which in turn can retrieve, cache, filter and potentially block the information from the
original server. A proxy is called transparent if all traffic goes through it, of the client's
configuration. Non-transparent proxies hence rely on the collaboration of the client (e.g. the
proxy settings of your web browser).
Following is a list of proxies that are available on Endian Firewall. Each proxy can be
configured via the links that are in the submenu on the left side of the screen:
HTTP - configure the web proxy including authentication, content filter and antivirus
POP3 - configure the proxy for retrieving mail via the POP protocol, including spam filter and
antivirus
SIP - configure the proxy for the session initiation protocol (SIP) used by voice over IP systems
FTP - enable or disable the FTP proxy (check files that are downloaded via FTP for viruses)
SMTP - configure the proxy for sending or retrieving mail via the SMTP protocol, including
spam filter and antivirus
DNS - configure the caching domain name server (DNS) including anti-spyware
HTTP
Select PROXY from the menu bar at the top of the screen, then select HTTP from the submenu
on the left side of the screen.
Configuration
Click on the ENABLE HTTP PROXY toggle to enable the HTTP proxy (Endian Firewall uses the
Squid caching proxy). Once the proxy is up and running, a number of controls appear.
First of all, you can define the way users in each zone (GREEN and, if enabled
also ORANGE, BLUE) can access the proxy. Per zone choices are:
PROXY PORT - the TCP port used by the proxy server (defaults
to 8080)
VISIBLE HOSTNAME - the proxy server will assume this as its
hostname (will also show at the bottom of error
messages)
CACHE ADMINISTRATOR EMAIL - the proxy server will show this email address in
error messages
LANGUAGE OF ERROR MESSAGES - the language in which error messages are
displayed
MAX UPLOAD SIZE - limit for HTTP file uploads (such as used by
HTML forms with file uploads) in KB (0 means
unlimited)
Then you will find a number of additional options, each in its own panel that can be expanded
by clicking on the + icon:
Click the SAVE button to confirm and save the configuration changes. Do not forget to click
the APPLY button to restart the proxy for the changes to become active.
The CLEAR CACHE button allows to delete all web pages and files cached by the HTTP proxy.
Authentication
Default policy
The default policy applies to all users of the proxy, whether they are authenticated or not.
Policy settings include a simple user agent and MIME type filter as well as advanced time-
based virus scanning and content filtering rules.
RESTRICT ALLOWED CLIENTS FOR WEB ACCESS - This checkbox activates the user agent filter, it
restricts web access to the selected user
agents.
MAX DOWNLOAD SIZE - This sets the limit for HTTP file downloads in KB
(0 means unlimited).
BLOCK MIME TYPES - Enabling this option will activate a filter which
checks incoming headers for their MIME type. If
the MIME type of the incoming file is set to be
blocked, access will be denied. This way you
can block files not corresponding to the
company policy (for example multimedia files).
ALLOWED CLIENTS FOR WEB ACCESS - Here you can choose allowed clients and
browsers from a list after clicking on
the + icon.
BLOCKED MIME TYPES - You can specify blocked MIME types by clicking
on the + icon and then adding one type per
line. The syntax conforms to the standard
defined by the IANA. Examples:
application/javascript, audio/mpeg, image/gif,
text/html, video/mpeg
You can view your own rules in the RULE LIST. Any rule can specify if web access is blocked or
allowed, in this last case you can activate and select a filter type. To add a new rule just click
on CREATE A RULE and the following settings can be performed:
You can then change priority, edit or delete each rule from the list of rules by clicking on the
appropriate icon on the right side of the table (see the icon legend at the bottom)
Content filter
Firstly, in order to use the content filter, you have to use Content filter as filter type in a rule
(either in DEFAULT POLICY or POLICY PROFILES ). Endian Firewall's Content Filter (DansGuardian)
takes advantage of three filtering techniques.
The first is called PICS (Platform for Internet Content Selection), it is a specification created by
W3C that uses metadata to label webpages to help parental control. The second is based on an
advanced phrase weighting system, it analyzes the text of web pages and calculates a score
for each page. The last method takes advantage of a huge list of categorized URLs and
domains, all URLs requested are compared with the blacklist before being served to clients.
The screen is divided into a general configuration section and a section where the specific
filtering policy can be chosen.
An example:
- google.com is blocked, which means all
subdomains of google.com are blocked as well
- maps.google.com is whitelisted so you can
access it
- maps.google.com does not work like it should
because it tries to get data from other google
servers
- you will have to whitelist these domains
(e.g. mt0.google.com) as well
Antivirus
In this section you can configure the virus scanner engine (ClamAV) used by the HTTP proxy.
MAX. CONTENT SCAN SIZE - Specify the maximum size for files that should
be scanned for viruses.
DO NOT SCAN THE FOLLOWING URLS - A list of URLs that will not be scanned for
viruses (one per line).
LAST UPDATE - Shows the day and time of the last virus
signatures update and the total amount of
viruses recognized by ClamAV (in parenthesis).
Click on SAVE to save the settings of the virus scanner engine.
Group policies
On this page you can create groups that can be associated to different policy profiles. These
groups can be associated to users when using Local authentication in
the PROXY , HTTP , AUTHENTICATION section.
You can add a group by clicking on the CREATE A GROUP link and entering a group name. After
clicking on the CREATE GROUP button the group is saved.
The profile of the groups can be changed by selecting the appropriate policy profile and then
clicking on the SAVE button below the group list. Groups can be deactivated, activated and
removed by clicking on the respective icons (as described in the legend below the list).
Policy profiles
It is possible to create additional profiles that can be used in the PROXY , HTTP , GROUP
POLICIES section.
Policy profiles are created just like the default policy in the PROXY , HTTP , DEFAULT
POLICY section.
POP3
Select PROXY from the menu bar at the top of the screen, then select POP3 from the submenu
on the left side of the screen. In this section you can configure the POP3 (incoming mail) proxy.
Global settings
On this page you can configure the global configuration settings of the POP3 proxy. You
can ENABLE or disable the POP3 proxy for every ZONE. It is also possible to enable the VIRUS
SCANNER and the SPAM FILTER for incoming emails.
If you want to log every outgoing POP3 connection you can enable the FIREWALL LOGS
OUTGOING CONNECTIONS checkbox.
Spam filter
On this page you can configure how the POP3 proxy should react once it finds a spam email.
SPAM SUBJECT TAG - Here you can specify a prefix for the spam
email's subject.
REQUIRED HITS - This option defines how many hits are required
for a message to consider it spam. The default
value is 5.
ENABLE MESSAGE DIGEST SPAM DETECTION(PYZOR) - If you want to detect spam using message
digests you can enable this option. Note that
this might slow down your POP3 proxy.
WHITE LIST - Here you can whitelist sender email-addresses
(one address per line). It is also possible to
whitelist whole domains by using wildcards,
e.g. *@example.com.
BLACK LIST - Here you can blacklist sender email-addresses
(one address per line). It is also possible to
blacklist whole domains by using wildcards,
e.g. *@example.com.
SIP
Select PROXY from the menu bar at the top of the screen, then select SIP from the submenu
on the left side of the screen.
The SIP Proxy is a proxy/masquerading daemon for the SIP and RTP protocols. SIP (Session
Initiation Protocol, RFC3261) and RTP (Real-time Transport Protocol) are used by Voice over IP
(VoIP) devices to establish telephone calls and carry voice streams.
The proxy handles registrations of SIP clients on the LAN and performs rewriting of the SIP
message bodies to make SIP connections possible through Endian Firewall and therefore allow
SIP clients (like x-lite, kphone, linphone or VoIP hardware) to work behind NAT. Without this
proxy, connections between clients are not possible at all if both are behind NAT, since one
client cannot reach the other directly and therefore no RTP connection can be established
between them.
Once enabled, the following options can be configured (confirm the settings by clicking SAVE ).
FTP
Select PROXY from the menu bar at the top of the screen, then select FTP from the submenu
on the left side of the screen.
The FTP (File Transfer Protocol) proxy is available only as transparent proxy, this allows
scanning for viruses on FTP downloads. Note that only connections to the standard FTP port
(21) are redirected to the proxy. This means that if you configure your clients to use the HTTP
proxy also for the FTP protocol, this FTP proxy will be bypassed!
You can enable the transparent FTP proxy on the GREEN zone and on the other enabled zones
(ORANGE, BLUE).The following options can be configured (confirm the settings by
clicking SAVE ).
FIREWALL LOGS OUTGOING CONNECTIONS - Show outgoing connections in the firewall log.
BYPASS THE TRANSPARENT PROXY - Specify sources (left panel) or destinations
(right panel), that are not subject to
transparent FTP proxying. Always specify one
subnet, IP address or MAC address per line.
Endian Firewall supports transparent FTP proxying
with frox if and only if it is directly connected to
the internet.
If you have another NATing firewall or router
between Endian Firewall and the internet, frox
does not work because it uses an active FTP
upstream.
SMTP
Select PROXY from the menu bar at the top of the screen, then select SMTP from the
submenu on the left side of the screen.
The SMTP (simple mail transfer protocol) proxy can relay and filter email traffic as it is being
sent towards email servers.
The scope of the SMTP proxy is to control and optimize SMTP traffic in general and to protect
your network from threats when using the SMTP protocol. The SMTP (Simple Mail Transport
Protocol) protocol is used whenever an email is sent by your mail client to a remote mail server
(outgoing mail). It will also be used if you have your own mail server running on your LAN
(GREEN interface) or your DMZ (ORANGE interface) and are allowing mails to be sent from
the outside of your network (incoming requests) through your mail server.
The SMTP proxy configuration is split into several subsections.
Warning
Main
The is the main configuration section for the SMTP proxy. It contains the following options:
To save and apply the settings you must click on the SAVE CHANGES AND RESTART button.
Antivirus
The Antivirus is one of the main features of the SMTP proxy module. Three different actions
can be performed when a mail that contains a virus is sent. It is also possible to configure an
email address for notifications.
To save and apply the settings just click on the SAVE CHANGES AND RESTART button.
Spam
The antispam module knows several different ways to protect you from spam mails. In general
spamassassin and amavisd-new are used to filter out spam. SpamAssassin provides several
means of detecting spam. It has a score tally system where large numbers of inter-related
rules fire off and total up a score to determine whether a message is spam or not.
The page is divided into two sections: SMTP PROXY and GREYLISTING.
The SMTP PROXY section contains the main configuration for the spam filter.
Save the settings and restart the SMTP Proxy by clicking on the SAVE CHANGES AND
RESTART button.
File Extensions
This allows you to block files with certain file extensions which may be attached to mails. Mails
which contain such attachments will be recognized and the selected action will be performed
for the respective mail. The following options can be configured:
BLOCKED FILE EXTENSIONS - You can select one or more file extensions to be
blocked. In order to select multiple files press
the control key and click on the desired entries
with your mouse.
BANNED FILES DESTINATION - You can choose between three different modes
how emails that contain such attachments
should be handled.
DISCARD: if you choose this mode the email
will be deleted
BOUNCE: if you choose this mode the email
will not be delivered but bounced back to the
sender in form of a non-delivery notification
PASS: if you choose this mode the email will be
delivered normally
BANNED FILES QUARANTINE - Here you can specify what kind of quarantine
you are using. Valid values are:
- leaving this field empty will disable the
quarantine for mails with blocked attachments.
- spam-quarantine this stores mails with
blocked attachments on the firewall (in
/var/amavis/virusmails), this is the default
setting.
- valid.email@address any valid email
address will result in the emails with blocked
attachments being forwarded to that email
address.
EMAIL USED FOR NOTIFICATION ON BANNED FILES - Whenever an email with an attachment that is
blocked due to its file extension is found, a
notification email is sent to this address.
BLOCK DOUBLE EXTENSIONS - If you enable this option, files with double
extensions will be blocked since these files are
usually created to harm computers (blocked
double extensions are composed of any
extension followed
by .exe, .com, .vbs, .pif, .scr, .bat, .cmd or .dll).
Save the settings and restart the SMTP Proxy by clicking on the SAVE CHANGES AND
RESTART button.
Blacklists/Whitelists
An often used method to block spam e-mails are so called real-time blacklists (RBL). These lists
are created, managed and updated by different organisations. If a domain or a sender IP
address is listed in one of the blacklists, emails from it will be refused without further notice.
This saves more bandwith than the RBL of the antispam module, since here mails will not be
accepted and then handled, but dismissed as soon as a listed IP address is found.
This dialogue also gives you the possibility to explicitely block (blacklist) or allow (whitelist)
certain senders, recipients, IP addresses or networks.
Warning
Save the settings and restart the SMTP Proxy by clicking the SAVE CHANGES AND
RESTART button.
Note
You can also create custom black- and whitelists by adding entries to the fields in
the BLACKLIST/WHITELIST section.
The following textareas can be filled out in this section:
To save the changes and restart the SMTP proxy click on the SAVE CHANGES AND
RESTART button.
If you have enabled incoming mail and would like to forward that mail to a mail server behind
your Endian Firewall - usually set up in the GREEN or ORANGE zone - you need to declare the
domains which will be accepted by the SMTP proxy and to which of your mail servers the
incoming mail should be forwarded to. It is possible to specify multiple mail servers behind
Endian Firewall for different domains. It is also easily possible to use Endian Firewall as a
backup MX.
To add a domain click the ADD button. To apply the changes the SMTP proxy has to be
restarted by clicking on the SAVE CHANGES AND RESTART button.
Existing entries can be edited and deleted by clicking on the respective icon (as described in
the legend at the bottom of the page).
Mail Routing
This option allows you to send a blind carbon copy (BCC) to a specified email address. This
option will be applied to all emails that are sent to the specified recipient address or are sent
from the specified sender address.
The mail route is saved by clicking on the ADD MAIL ROUTE button. Existing entries can be
changed or deleted by clicking on the respective icons which are explained in the legend at the
bottom of the page.
Warning
Advanced
On this page you can configure the advanced settings of the SMTP proxy. In
the SMARTHOST section the following options can be configured:
SMARTHOST ENABLED FOR DELIVERY - Check this box if you want to use a smarthost
to deliver emails.
ADDRESS OF SMARTHOST - Here you can enter the address of the
smarthost.
AUTHENTICATION REQUIRED - Check this box if the smarthost requires
authentication.
USERNAME - This username is used for authentication.
PASSWORD - This password is used for authentication
AUTHENTICATION METHOD - Here you can choose the authentication
methods that are supported by your
smarthost. PLAIN, LOGIN, CRAM-MD5 and DIGE
ST-MD5 are supported.
The settings are saved and applied by clicking on the SAVE CHANGES AND RESTART button.
In the IMAP SERVER FOR SMTP AUTHENTICATION section you can configure which IMAP server
should be used for authentication when sending emails. Most of all this is important for SMTP
connections that are opened from the RED zone.
The following settings can be configured:
The settings are saved and applied by clicking on the SAVE CHANGES AND RESTART button.
The settings are saved and applied by clicking on the SAVE CHANGES AND RESTART button.
DNS
Select PROXY from the menu bar at the top of the screen, then select DNS from the submenu
on the left side of the screen.
In this section you can change the settings for the DNS proxy. It is divided into three subpages.
DNS proxy
On this page you can enable the transparent DNS proxy for
the GREEN, ORANGE and BLUE zones (if they are active).
You can also define for WHICH SOURCE ADDRESSES THE PROXY WILL BE BYPASSED in the lower left
textarea. These sources can be IP addresses, addresses of subnets and MAC addresses (one
per line).
In the lower right textarea you can enter DESTINATIONS FOR WHICH THE PROXY IS BYPASSED. In
this textarea IP addresses and addresses of subnets can be entered.
To save the settings you must click on the SAVE button.
Custom nameserver
On this page you can add custom nameservers for specific domains. You can add a new
custom nameserver by clicking on the ADD NEW CUSTOM NAME SERVER FOR A DOMAIN link. To
change an existing entry you have to click on the pencil icon in its row. Clicking on a trash can
icon will delete the custom nameserver in that row.
The following details can be saved for custom nameservers:
DOMAIN - The domain for which you want to use the
custom nameserver.
DNS SERVER - The IP address of the namserver.
REMARK - An additional comment you might want to save.
Anti-spyware
On this page you can configure how your Endian Firewall should react if a domain name has to
be resolved that is known to be used by spyware. The options that can be set are: