Skip to content

antoniopaya22/SPA-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPA-Example

Single Packet Authorization with fwknop example environment in Docker-Compose.


SPA-Example


Usage

1. Clone this repository

$ git clone https://github.com/antonioalfa22/SPA-Example
$ cd SPA-Example

2. Build the Docker images

$ docker-compose up -d --build

3. Configuration

3.1. Generate the SPA keys

First, 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 --verbose

Then, copy the KEY_BASE64 and the HMAC_KEY_BASE64 to the server access.conf file.

3.2. Start the SPA server

$ docker exec -it spa-server /bin/bash
$ fwknopd -f

3.3. Start the client access request

First, 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]

About

Single Packet Authorization example with fwknop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published