Installing the agent on Alpine Linux
Last updated 2024-02-20
IMPORTANT
This guide only applies to Next-Gen WAF customers with access to the Next-Gen WAF control panel. If you have access to the Next-Gen WAF product in the Fastly control panel, you can only deploy the Next-Gen WAF with the Edge WAF deployment method.
This guide explains how to install the Next-Gen WAF agent on Alpine Linux. This guide includes instructions for Alpine running in a Docker container, virtual machine (VM), or bare-metal server.
Prerequisites
- If Alpine is being run in a Docker container, you must start the container before following these instructions.
- Copy the agent keys for the site that you want the agent to be able to access. You will use the agent keys when configuring the Next-Gen WAF agent package.
Add the package repository
Begin the agent installation by adding the version of the Alpine package repository that you want to use.
If you are running Alpine in a Docker container, run the following script to add the package repository:
$ apk update$ apk add wget$ wget -q https://apk.signalsciences.net/sigsci_apk.pub ; mv sigsci_apk.pub /etc/apk/keys/$ echo https://apk.signalsciences.net/3.19/main | tee -a /etc/apk/repositories && apk update
If you are running Alpine in a VM or on a bare-metal server, run the following script to add the package repository:
$ sudo apk update$ sudo apk add wget$ sudo wget -q https://apk.signalsciences.net/sigsci_apk.pub ; sudo mv sigsci_apk.pub /etc/apk/keys/$ sudo echo https://apk.signalsciences.net/3.19/main | sudo tee -a /etc/apk/repositories && sudo apk update
Verify the downloaded key
After you've installed the Alpine package repository, verify the downloaded key contains the proper key by running the following command:
$ openssl rsa -pubin -in /etc/apk/keys/sigsci_apk.pub -text -noout
If the downloaded key contains the proper key, the expected output looks like the following:
Public-Key: (2048 bit)Modulus: 00:bb:23:1a:ef:0d:61:8f:8d:55:aa:ad:01:84:43: 6c:46:42:42:ab:5b:ec:4e:4b:e2:e6:b6:e7:3d:45: b7:96:70:fe:16:95:aa:09:f1:90:82:40:e4:30:2b: 9e:2a:03:e9:74:63:55:66:f0:db:8c:b9:5b:f8:45: 5f:ad:4e:7a:14:da:02:83:c2:36:a0:84:74:a0:bb: f9:3f:03:c8:fe:80:6a:95:0c:17:22:55:40:30:18: 51:d9:30:db:7c:1b:d0:06:4e:a9:51:1a:31:0e:33: f0:6e:ad:53:98:31:a5:ac:a3:a1:44:83:72:a1:ca: 78:e3:24:70:ab:7a:0e:66:32:3b:f6:c9:90:16:dc: 89:d0:52:7a:50:a8:f8:59:0a:34:12:2e:85:11:f5: 80:0d:d4:7d:a7:7b:3b:d7:d9:1e:28:ed:bb:f7:08: 2e:9f:73:a5:23:d8:53:b4:7e:21:dd:ae:92:4a:d0: 5b:86:21:9c:82:05:21:29:eb:c1:ab:91:cd:1a:7b: 95:6d:43:d3:1a:a9:62:2b:b0:95:9e:cf:18:82:64: 02:f9:38:7e:7f:47:9f:d9:f3:ac:fd:2c:30:ff:75: b1:11:27:1c:7a:d6:ca:04:19:f8:31:80:42:e9:4a: 0d:ab:d5:b8:ad:f2:35:31:a5:3f:98:19:99:fc:29: e8:4fExponent: 65537 (0x10001)
Install and configure the Next-Gen WAF agent package
Now that you've downloaded the Alpine package repository and verified that you have the proper key, you can install and configure the Next-Gen WAF agent package:
- Run the following command to install the Next-Gen WAF agent package:$ sudo apk add sigsci-agent
- Create an empty agent configuration file in the following directory:
/etc/sigsci/agent.conf
. - Add the agent keys for your site to the agent configuration file.accesskeyid = "AGENTACCESSKEYHERE"secretaccesskey = "AGENTSECRETACCESSKEYHERE"
- Save the agent configuration file.
Start the Next-Gen WAF agent
Now that you've installed and configured the agent package, you can start the Next-Gen WAF agent.
If you are running Alpine in a Docker container, run the following command to start the Next-Gen WAF agent:
$ /usr/sbin/sigsci-agent
If you are running Alpine in a VM or on a bare-metal server, run the following command to allow the agent to start on reboot:
$ sudo rc-update add sigsci-agent default
Then, start the agent by running any of the following commands:
$ sudo service sigsci-agent start$ sudo rc-service sigsci-agent start$ sudo /etc/init.d/sigsci-agent start
Next steps
Explore our module options and install the Next-Gen WAF module.
Do not use this form to send sensitive information. If you need assistance, contact support. This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.