Whitelist Automation by accessing directly to the database
To feed white lists via script, you can read and write directly to the SQLite database
Return back to the Proxy ACLs main section
Accessing the database is a little more technical than using APIs, as you have to operate in several stages
Using SQLite3, access to the /home/artica/SQLITE/acls.db database
The main table is acls_whitelist
Fields are:
zDate: Date string of the record in US format (0000-00-00 00:00:00)ztype: Must be a string of “dstdomain” (for a domain) ,"dst" (for a destination IP or CDIR) , “arp” for a source MAC Addresspattern: the recordenabled: Integer 0/1description: a free text
Insert a record example :
INSERT OR IGNORE INTO acls_whitelist (zDate,ztype,pattern,enabled,description) VALUES ('2024-07-21 :00:01:00','dstdomain','domain.tld',1,'Added by script')
Finally Use the API to order Artica to compile:
wget http://127.0.0.1:9503/proxy/whitelists/compile