InnerWeb
Skip to main content

WAF and IPsec tunnel for the system: implementation notes

External access to the server in a plant is the most sensitive point of any deployment. Phones on the GSM network must reach the application, the vendor's service must be able to work, and production machines must not gain any new path. The solution is one entry point under the customer's control: a WAF, one published address, an outbound firewall and an IPsec tunnel.

1
published address of the system for phones
Source: karta
4
network zones in the on-premise installation
Source: karta

Goal: access for phones and the service, no access for machines

Traffic from outside, meaning phones on the GSM network and the vendor's service, reaches the system only through an entry point under the customer's control. It consists of a WAF application firewall, one published address, an outbound firewall and the end of an IPsec tunnel on the customer's side. The design principle is the reverse of the usual one: we do not open ports to the system, we define a single path through which the system is reachable.

For the network department this means one rule to audit instead of several exceptions. For the OT department: the machine network is not part of this path.

Network zones where you configure this

In an on-premise installation the zone pattern applies. Zone 0 is the plant area with BLE beacons, zone 1 the users in the plant, zone 2 the plant LAN and zone 3 the customer's private cloud. The entry point sits on the boundary between the plant network and the external network, and a server in zone 2 or 3 is not directly visible from the internet.

The BLE beacons in zone 0 do not even have to be visible in the IP network, because the phone calculates the position from the signals of several beacons. This reduces the number of devices that must be covered by firewall rules.

Example number of rules to audit by the network department

Example number of rules to audit by the network departmentChart: in the example, six rules with a few open ports and three with one entry point.0246rulesA few open ports (example)A few open ports (example): 6 rules6One entry point (example)One entry point (example): 3 rules3
Source: Example calculation: inbound, outbound and tunnel rules under two approaches

WAF and one published address

The application firewall filters HTTP traffic before it reaches the application: it rejects typical attacks on forms, excessive requests and unusual headers. One published address, for example one domain name, makes the certificate, monitoring and blocking easier. Phones connect only to this address.

Set limits on the number of requests and on response times so that they do not choke the inflow of delayed events after a connectivity outage. This is a common mistake: a WAF configured too strictly treats the peak after the network returns as an attack.

Outbound firewall: the server does not call just anywhere

The outbound firewall limits where the server itself may connect. By default nothing beyond the agreed addresses: the plant's mail server, time services and, if needed, the named integration points. This way, even if a container were taken over, traffic could not leave for an arbitrary destination.

The location works without GPS and without an external map service, so there is no need to open outbound traffic to map data providers. The data and the backups stay on the customer's disks.

IPsec tunnel for the vendor's service

The vendor's service enters through an IPsec tunnel whose end is on the customer's side. The plant keeps control: it sets the addresses that may be reached, the working hours of the tunnel, and it can switch the tunnel off. The architecture of the protocol is described in RFC 4301.

It is worth recording in the contract or in the procedure who opens the tunnel, for how long and who approves the service work. The tunnel is not a permanent link if the plant does not want it to be one.

Start-up order and acceptance tests

Bring up the entry point on preproduction first. Check whether a phone on the GSM network connects to the published address, whether a request from a production machine does not reach the server, whether the tunnel works only within the agreed scope, and whether the outbound firewall blocks an attempt to connect to an unapproved address.

  • A phone on GSM connects to one published address.
  • There is no path from the machine network to the server.
  • The IPsec tunnel works only for the agreed addresses.
  • The outbound firewall blocks unapproved destinations.
  • The WAF limits do not block the peak after a connectivity outage.

Video

Frequently asked questions

Does the server have to be visible from the internet?

No. Traffic from outside comes through one entry point under the customer's control, and the server stands in the plant network or in a private cloud.

How does the vendor's service connect to the system?

Through an IPsec tunnel whose end is on the customer's side. The plant decides the scope and the time, and can switch the tunnel off.

Do production machines get access to the system?

No. The whole model assumes that the machine network is not part of the entry path.

Why can the WAF block phones after an outage?

Overly strict request limits treat the wave of delayed events as an attack. The limits have to be matched to the peak measured on preproduction.

Sources

Let's set the entry point with the network department

We will go through the zones, the WAF rules and the scope of the IPsec tunnel with your network department before anything is opened.

Let's talk