Single Packet Authorization with fwknop example environment in Docker-Compose.
$ git clone https://github.com/antonioalfa22/SPA-Example
$ cd SPA-Example$ docker-compose up -d --buildFirst, generate the Base64 keys on the client:
$ docker exec -it spa-client /bin/bash
$ fwknop -A [SERVICES (tcp/80, tcp/22)] --use-hmac -R -D [SERVER_IP] --key-gen --save-rc-stanza --verboseThen, copy the KEY_BASE64 and the HMAC_KEY_BASE64 to the server access.conf file.
$ docker exec -it spa-server /bin/bash
$ fwknopd -fFirst, replace the [Gateway IP] on the /root/.fwknoprc file with the gateway IP.
Then, run the following command to request access to the server:
$ docker exec -it spa-client /bin/bash
$ fwknop -n [SERVER_IP] --wget-cmd /usr/bin/wget -a [CLIENT_IP]