This project contains configuration files and scripts for setting up and managing an OPNsense firewall. OPNsense is an open-source, easy-to-use, and easy-to-build FreeBSD-based firewall and routing platform.
-
Clone the repository:
git clone https://github.com/guyzsarun-lab/opnsense-configuration.git
-
Navigate to the project directory:
cd opnsense-configuration
-
Update the
terraform.tfvars
file with the required values. See example.To generate api key and secret, follow the steps below:
- Go to
System
>Access
>Users
. - Click on the
API keys
tab.
- Go to
-
Update the
dns_override.json
file for the DNS override configuration. See dns_override.
- Example dns override for k8s.example.com to 192.168.1.1
[ { "hostname": ["k8s"], "domain": "example.com", "server": "192.168.1.1" } ]
- Run Terraform to setup the infrastructure:
terraform init terraform apply