I just set up the elk suite
I installed filebeat on a client machine, but this one to iptables rules.
I have to fight with, I can not let pass filebeat.
if I disable the iptables, filebeat communicates perfectly.
someone would have a clear idea of the rules to set up for filebeat (specifying the ip of the machine elk) ?
Thank you for your help.
We would need a bit more context about how your other rules are setup, but in general you'll need a rule to allow outgoing TCP traffic to the destination server. For example, this would be to Logstash at 192.0.2.0:5044.
It looks like you have your DROP rules before any of your other rules so all packets in/out/forwarded are going to be dropped. Showing the rules using sudo iptables -L -n will show their true order. Typically you want the DROP rules to be last.
iptables -F
iptables -X
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -j DROP
iptables -A INPUT -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -j DROP
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -j DROP
iptables -A OUTPUT -o lo -j ACCEPT
iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p icmp -j ACCEPT
iptables -A OUTPUT -m tcp -p tcp --dst [logstash_IP] --dport 5044 -j ACCEPT
iptables -A OUTPUT -j DROP
iptables -A FORWARD -j DROP
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.