ncampos
(usa Debian)
Enviado em 30/06/2016 - 16:50h
SMarcell escreveu:
Dá sim, use o iptables pra isso. Você pode tentar algo +/- assim:
* Supondo que o IP monitorado será o 192.168.1.2
iptables -N IPS_MONITORADOS
iptables -A IPS_MONITORADOS -m limit --limit 20/min -j LOG --log-prefix "iptables->log: " --log-level 7
iptables -A FORWARD -s 192.168.1.2/32 -j IPS_MONITORADOS
Feito isso basta ir até o arquivo '/var/log/messages' e verificar quais destinos esse IP está acessando.
Obrigado pelo retorno,rodei sua instrução porem nao trouxe nada de referencia.
deveria ser executado assim ??
root@firewall:~# iptables -A IPS_MONITORADOS -m limit --limit 20/min -j LOG --log-prefix "iptables->log: " --log-level 7
root@firewall:~# iptables -A FORWARD -s 192.168.0.10/24 -j IPS_MONITORADOS
root@firewall:~# cat /var/log/messages
Jun 26 06:25:04 firewall rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2094" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 27 06:25:03 firewall rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2094" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 28 06:25:04 firewall rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2094" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 28 10:46:02 firewall squid[3855]: Squid Parent: child process 3858 exited with status 0
Jun 28 10:46:03 firewall squid[6980]: Squid Parent: child process 6983 started
Jun 28 14:25:14 firewall squid[6980]: Squid Parent: child process 6983 exited with status 0
Jun 28 14:25:15 firewall squid[8448]: Squid Parent: child process 8451 started
Jun 29 06:25:03 firewall rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2094" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 30 06:25:04 firewall rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2094" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 30 06:25:04 firewall rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2094" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
~