This is a Go API that provides a RESTful interface for managing nftables, a powerful and flexible firewall framework in the Linux kernel.
- CRUD operations for nftables rules: Create, Read, Update, and Delete rules easily through the API.
- Easy to use: Simple and intuitive API design ensures a smooth and efficient development experience.
It is necessary to create a .env file in the root directory of the project.
# PostgreSQL
DB_DRIVER=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASS=postgres
DB_NAME=nftablesdb
WEB_SERVER_PORT=8000
JWT_SECRET=secret
JWT_EXPIRE_IN=30000
#SQLite
DB_DRIVER=sqlite3
DB_PATH=./nftables.db
WEB_SERVER_PORT=8000
JWT_SECRET=secret
JWT_EXPIRE_IN=30000
go install github.com/cosmtrek/air@latest
air -d