- Install necessary packages
- Configure pf to use fwknop
- Add the following anchor to allow fwknop to modify pf rules
1
2
3
| # /etc/pf.conf
# Place this towards the top of the file
anchor "fwknop" # ADD THIS
|
- Generate a fwknop key pair
This will not save anywhere by default, you must copy the information displayed
- Using the generated information update access.conf to use the key pair
1
2
3
4
5
| # /etc/fwknop/access.conf
SOURCE ANY
KEY_BASE64 <KEY_HERE>
HMAC_KEY_BASE64 <HMAC_KEY_HERE>
FW_ACCESS tcp/22 #Example using ssh
|
- Modify fwknopd to set how the daemon listens
1
2
3
4
| # /etc/fwknop/fwknopd.conf
PCAP_INTF <LISTENING_INTERFACE_NAME>
ENABLE_PF_ANCHOR Y
PF_ANCHOR_NAME fwknop
|
- Enable and start fwknopd
1
2
| rcctl enable fwknopd
rcctl start fwknopd
|