Q: Is it possible to track new querys on DB? I'm searching for a new options all days and I'm making a new Word file with all the information I get but I can't reach a conclusion.
I'll explain the main idea.
My idea:
User (Employee, client) => Firewall (VPN or Proxy) => Office Network 
What should I use?
PFSense, Proxie, Ubuntu + OpenVPN or ??
What I want to track/monitor?
CLOUD - Local Machine with Address IP: 192.168.x.x
Database
I want to monitor all the things they have done at our cloud and the querys or changes on database. And I want this changes and logs in one file or database. 
Currently using AZURE and its a little bit hard for me to configure it right with pfsense.
Is it possible to structure something like this?

A: Use tcpdump, and store what you need in some log files.
To monitor queries to database you can use for example this script.
source -> https://liferay.dev/blogs/-/blogs/how-to-catch-mysql-sql-with-tcpdump-in-linux/maximized
#!/bin/bash
tcpdump -i your_network_interface_name -s 0 -l -w - dst port 3306 | strings | perl -e '
while(<>) { chomp; next if /^[^ ]+[ ]*$/;
    if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER|CALL)/i)
{
    if (defined $q) { print "$q\n"; }
    $q=$_;
} else {
    $_ =~ s/^[ \t]+//; $q.=" $_";
}

}'
You can even specify source and destination IP which you need to monitor.
