-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all sqlite tables used for firewall db storage
- Loading branch information
1 parent
f6f7ec0
commit 06dba40
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
-- name: create-blacklist | ||
BEGIN; | ||
CREATE TABLE IF NOT EXISTS blacklist ( | ||
IPAddress TEXT NOT NULL, | ||
EntryDate TEXT NOT NULL, | ||
LastSeen TEXT NOT NULL, | ||
Reason TEXT NOT NULL, | ||
LogicalDelete INT NOT NULL | ||
); | ||
CREATE INDEX IF NOT EXISTS blacklist_1 ON blacklist (LogicalDelete, IPAddress); | ||
COMMIT; | ||
|
||
-- name: create-whitelist | ||
BEGIN; | ||
CREATE TABLE IF NOT EXISTS whitelist ( | ||
IPAddress TEXT NOT NULL, | ||
EntryDate TEXT NOT NULL, | ||
Reason TEXT NOT NULL, | ||
LogicalDelete INT NOT NULL | ||
);s | ||
CREATE INDEX IF NOT EXISTS whitelist_1 ON whitelist (LogicalDelete, IPAddress); | ||
COMMIT; | ||
|
||
-- name: create-rules | ||
BEGIN; | ||
CREATE TABLE IF NOT EXISTS rules ( | ||
RuleNum INT NOT NULL, | ||
Zone TEXT NOT NULL, | ||
FromIP TEXT NOT NULL, | ||
FromPort TEXT NOT NULL, | ||
ToIP TEXT NOT NULL, | ||
ToPort TEXT NOT NULL | ||
); | ||
COMMIT; | ||
|
||
-- name: create-opts | ||
BEGIN; | ||
CREATE TABLE IF NOT EXISTS ruleopts ( | ||
Inbound TEXT NOT NULL, | ||
Outbound TEXT NOT NULL | ||
); | ||
INSERT INTO ruleopts VALUES ("allow", "deny"); | ||
COMMIT; |