Description:
The following document describes how to set up your router's firewall using pre-defined scripts.
Requirements:
- LCOS as of version 7.60 (download latest version)
- LANtools as of version 7.60 (download latest version)
Strategies for configuring the firewall
Firewalls are interfaces between networks and restrict the exchange of data, to a greater or lesser extent. The purpose of a firewall is thus diametrically opposed to that of the network to which it belongs: Networks are supposed to connect computers, firewalls aim to prevent connections.
This contradiction indicates the dilemma of the responsible administrators who, as a result, have developed various strategies as a solution.
Allow-All
The allow-all strategy prioritizes the unobstructed communication between network users before security. It basically allows any communication and the LAN is open to intruders. The LAN only becomes more secure when the administrator successively configures new rules that restrict or prevent elements of the communication.
Deny-All
The deny-all strategy starts with a "block everything" approach with the firewall blocking all communication between the network and the rest of the world. As a second step the administrator then opens up address ranges or ports that are required for day-to-day communication with the Internet, etc.
This approach is better for the security of the LAN than the allow-all strategy but often leads to difficulties for users in the initial phase. Some things may simply not work in the same way after the deny-all firewall is activated and some computers may not be reachable, etc.
Developing an explicit "deny-all" strategy
In order to achieve the maximum degree of security and control over data traffic, we recommend that you initially block all data transfers through the firewall. Subsequently, only those functions and communication paths that are really required are selectively activated. This provides protection for example from so-called 'trojan horses' or e-mail viruses that actively establish an outgoing connection via certain ports.
Some typical applications are described below as firewall rules and can be transferred simply and easily using scripts, irrespective of device type and
software version.
Deny-All: The most important rule in a firewall
The deny-all rule is by far the most important rule for the protection of your LAN. With this rule the firewall acts in accordance with the following principle: "Anything not explicitly allowed is forbidden". This is the only strategy with which the administrator can be really sure that no possibility of access has been "forgotten" – only those points of access that have been explicitly allowed are available.
Name | Description | Script file |
Deny-ALL | This rule blocks any communication via the IP router or firewall. | |
Allow-HTTP/S | This rule allows HTTP and HTTPS (hypertext transfer protocol) from the LAN. These protocols are used to call Web pages. Important notice: The "Allow-DNS" rule is required in combination with this rule. | |
Allow-FTP | This rule allows FTP (file transfer protocol) from the LAN. This protocol is used for downloading files. Important notice: the "Allow-DNS" rule is required in combination with this rule. | |
Allow-DNS | This rule allows the DNS (Domain Name System) protocol from the LAN. This protocol is used for resolving names. Its main job is to transform "Internet addresses" into the relevant IP addresses. | |
Allow-SMTP | This rule allows SMTP (Simple Mail Transfer Protocol) from the LAN via the TCP port 25. This protocol is used to send e-mails. Important notice: the "Allow-DNS" rule is required in combination with this rule. | |
Allow-Secure-Mail | This rule allows SMTP (Simple Mail Transfer Protocol) via the TCP port 587 from the LAN. This protocol is used to send e-mails. Additionaly the protocols IMAP (Internet Message Access Protocol) via the TCP port 993 and POP3 (Post Office Protocol Version 3) via the TCP port 995 are allowed. E-mail clients use these protocols to collect e-mail from a server. Important notice: the "Allow-DNS" rule is required in combination with this rule. | |
Allow-MAILING | This rule allows SMTP (Simple Mail Transfer Protocol) via the TCP port 25 from the LAN. This protocol is used to send e-mails. Additionally the protocols IMAP (Internet Message Access Protocol) via the TCP port 143 and POP3 (Post Office Protocol Version 3) via the TCP port 110 are allowed. E-mail clients use these protocols to collect e-mail from a server. Important notice: the "Allow-DNS" rule is required in combination with this rule. | |
Allow-RDP | This rule allows RDP (Remote Desktop Protocol) from the LAN. The Remote Desktop Protocol (RDP) is a Microsoft protocol. It provides the technical basis for implementing terminal services between two computer systems. | |
Allow-IPSEC | This rule allows the IP protocols 50 (ESP), 51 (AH) and 108 (IPCOMP) as well as IKE (Internet key exchange) that are required for IPSec (Internet Protocol Security) connections. This enables an IPSec connection to be established from a local client to a VPN gateway in the Internet. Note: This rule is not required when the LANCOM router is the terminating point for IPSec connections. | |
Allow-VPN-ROUTING | This rule allows any communication to target networks that are in the LANCOM router's IP routing table and point to a VPN remote device. | |
Allow-ELSTER | This rule allows the ELSTER application (German electronic tax declaration) to be used from the LAN. Important notice: the "Allow-DNS" rule is required in combination with this rule. | |
Allow-NTP | This rule allows NTP (Network Time Protocol) from the LAN. Applications can use this protocol to obtain the current online time from a time server. Important notice: the "Allow-DNS" rule is required in combination with this rule. Note: This rule is not required if the LANCOM router is configured as a time server. | |
Allow-SNMP | This rule allows SNMP (Simple Network Management Protocol) from the LAN. The protocol is used to monitor and manage network components (such as routers, servers switches, printers, computer) from a central device. | |
Allow-TELNET/SSH | This rule allows the Telnet (Telecommunication Network) and SSH (Secure Shell) protocols from the LAN. Telnet is used to provide users with access to Internet computers from the command line (CLI). SSH is both an application as well as a network protocol and is used to log on to a remote computer and execute programs over an encrypted network connection. | |
Allow-TFTP | This rule allows TFTP (Trivial File Transfer Protocol) from the LAN. The protocol is a very simple file transfer protocol and is used to load operating systems or for configuration purposes over the network. | |
Allow-ICMP | This rule allows the IP protocol ICMP (Internet Control Message Protocol) from the LAN. It is used in networks to exchange error and information messages. | |
Deny-ALL (Package) | This rule combines all rules together into one script file. This rule blocks any communication via the IP router or firewall. + This rule allows the following protocols: HTTP/S, FTP, DNS, SMTP, MAILING, RDP, IPSEC, VPN-Routing, ELSTER, NTP, SNMP, TELNET/SSH, TFTP and ICMP |
Notice:
We recommend that you set the Deny-All rule before attaching the LAN to the Internet via a LANCOM device. You can then use the logging table (that can be launched from LANmonitor) to easily see which connections have been blocked by the firewall. Using this information you can then successively add "allow-rules" to the firewall.
Developing an explicit "Allow-All" strategy
The LANCOM firewall's default configuration is based on an "Allow-All" strategy" and all communication is allowed. Undesired functions and communication paths over the firewall should then be selectively blocked.
Some typical applications are described below as firewall rules and can be transferred simply and easily using scripts, irrespective of device type and
software version.
Name | Beschreibung | Skript-Datei |
Deny-SMTP | This rule blocks SMTP (Simple Mail Transfer Protocol) from the LAN. This protocol is used to send e-mails. | |
Deny-MAILING | This rule blocks SMTP (Simple Mail Transfer Protocol) via the TCP port 25 from the LAN. This protocol is used to send e-mails. Additionally the protocols IMAP (Internet Message Access Protocol) via the TCP port 143 and POP3 (Post Office Protocol Version 3) via the TCP port 110 are blocked. E-mail clients use these protocols to collect e-mail from a server. | |
Deny-HTTP/S | This rule blocks HTTP and HTTPS (Hypertext Transfer Protocol) from the LAN. These protocols are used to call Web pages. | |
Deny-FTP | This rule blocks FTP (File Transfer Protocol) from the LAN. This protocol is used for downloading files. | |
Deny-RDP | This rule blocks RDP (Remote Desktop Protocol) from the LAN. The Remote Desktop Protocol (RDP) is a Microsoft protocol. It provides the technical basis for implementing terminal services between two computer systems. | |
Deny-FILESHARING | This rule blocks communication from the local network for the common filesharing applications. Important notice: We assume no liability for the completeness of the information in the rule regarding ports. | |
Deny-INST-MESSAGING | This rule blocks communication from the local network for the common instant messaging applications. Important notice: We assume no liability for the completeness of the information in the rule regarding ports. | |
Deny-ICMP | This rule blocks the IP protocol ICMP (Internet Control Message Protocol) from the LAN. It is used in networks to exchange error and information messages. | |
Deny-NTP | This rule blocks NTP (Network Time Protocol) from the LAN. Applications can use this protocol to obtain the current online time from a time server. Important notice: the "Allow-DNS" rule is required in combination with this rule. Note: This rule is not required if the LANCOM router is configured as a time server. | |
Deny-SNMP | This rule blocks SNMP (Simple Network Management Protocol) from the LAN. The protocol is used to monitor and manage network components (such as routers, servers switches, printers, computer) from a central device. | |
Deny-TELNET/SSH | This rule blocks the Telnet (Telecommunication Network) and SSH (Secure Shell) protocols from the LAN. Telnet is used to provide users with access to Internet computers from the command line (CLI). SSH is both an application as well as a network protocol and is used to log on to a remote computer and execute programs over an encrypted network connection. | |
Deny-ELSTER | This rule blocks the ELSTER application (German electronic tax declaration) from the LAN. | |
Deny-TFTP | This rule blocks TFTP (Trivial File Transfer Protocol) from the LAN. The protocol is a very simple file transfer protocol and is used to load operating systems or for configuration purposes over the network. |
Procedure:
- The scripts can be imported using LANconfig.
- Highlight the device to be configured, from the context menu (right mouse button) select the menu item Configuration Management → Restore script from file.
- Select one script file and confirm the import with Open. After the script has been loaded you will find the newly created rule in LANconfig under Firewall/QoS → IPv4-Rules → Rules.
- Repeat the above steps to import additional rules.