Skip to content

Instantly share code, notes, and snippets.

View kzltp's full-sized avatar
🏠
Working from home

Arif Kızıltepe kzltp

🏠
Working from home
View GitHub Profile
@kzltp
kzltp / does a matching rule exist in that chain.arf
Last active June 10, 2023 04:49
docker iptables bad rule (does a matching rule exist in that chain )
WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exist in that chain?).
1-) The firewalld application is updated.
yum update firewalld
2-) Firewalld rule is added.
firewall-cmd --zone=public --permanent --add-masquerade
3-) And reload firewall
@kzltp
kzltp / autosendmessage.sh
Last active August 21, 2020 09:34
Kafka Random Send Message Script
#!/bin/sh
WORDFILE="/usr/share/dict/words"
messcounst=0
while true
do
date=$(date +"%Y-%m-%d_%H-%M-%S")
messcounst=`expr $messcounst + 1`
word=$(shuf -n1 /usr/share/dict/words)
echo "$date Arif'in mesaji random word P1 - $messcounst : $word" | /opt/kafka/bin/kafka-console-producer.sh --broker-list [KAFKAHOST]:9092 --topic ArifTestTopic > /dev/null
sleep 15
@kzltp
kzltp / CentosSystemHealth.sh
Last active May 31, 2020 21:09
This article we are introducing a shell script to perform linux system health check. This script collects system information and status like cpu / memory / disk usage.
#!/bin/bash
MAİL="mail@mail.com"
# Memory
free -m | awk 'NR==2{printf $3}' > /tmp/memory
if [[ $(free -m | awk 'NR==2{printf $3}') -gt 3600 ]];