New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Monitor outgoing HTTP traffics using default linux tools (Plesk server)
I spent hours searching for solution , most answers required installing new packages tcpdump
or a third-party tools e.g Fiddler
.
I'm trying to develop Plesk extension to client similar to what WP Snitch plugin do , but on server wide to monitor outgoing traffics and the script the cause it , Apache mod_status had no enough information , and Apache do not log outgoing traffic e.g from file_get_contents("https://example.com/")
php function
One solution I found is enabling iptables
traffic log
iptables -I INPUT -i LAN_Interface -s 0.0.0.0/0 -p tcp --dport 443 -j LOG
And retrieve the log from /var/log/messages
But that's aren't particle specially if I want install the same extension on other client server.
Comments
Isn't it possible to just use the binary in the plugin location? I'm not sure native tools would give you that much of data without going through different logs and stitching together things.
This will be last and hard solution I want to go to , I don't know what Plesk policy about this , since i have to send them my plugin to get certified before they put it in the marketplace ,
Anyway even if I attached binary to the plugin it should work as service to work 24/7 monitoring the traffics .
Alright the client told me it's OK to install new packages on the system even use third-party tools , so which tools you think suite this job .