- ผู้เขียนไม่มีส่วนรับผิดชอบต่อความผิดพลาดใด ๆ ที่อันจะเกิดขึ้นจากแชร์ session แบบ read-write กรุณารับผิดชอบด้วยตัวเอง!
- หากไม่รู้จักว่า tmux คืออะไรให้เปิด Google ครับ ท่านผู้นำบอกมา!!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@version:3.2 | |
# =============================================================================================== | |
# Configuration file for syslog-ng, customized for remote logging | |
# =============================================================================================== | |
# Options | |
# Note about $HOST / HOST | |
# Description: The name of the source host where the message originates from. | |
# If the message traverses several hosts and the chain_hostnames() option is on, the first host in the chain is used. | |
# If the keep_hostname() option is disabled (keep_hostname(no)), the value of the $HOST macro will be the DNS hostname of the host that sent the message to syslog-ng OSE (that is, the DNS hostname of the last hop). In this case the $HOST and $HOST_FROM macros will have the same value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for iptables events): | |
# GROK Patterns for iptables Logging Format | |
# | |
# Created 6 Aug 2016 by Brian Turek <brian.turek@gmail.com> | |
# Most of this was taken from another source but now I cannot find it for credit | |
# | |
# Usage: Use the IPTABLES pattern | |
NETFILTERMAC %{MAC:dest_mac}:%{MAC:src_mac}:%{ETHTYPE:ethtype} | |
ETHTYPE (?:(?:[A-Fa-f0-9]{2}):(?:[A-Fa-f0-9]{2})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Step 1 | |
#Generate server keystore and client keystore | |
keytool -keystore kafka.server.keystore.jks -alias localhost -validity 365 -genkey | |
keytool -keystore kafka.client.keystore.jks -alias localhost -validity 365 -genkey | |
#Step 2 | |
#Create CA | |
openssl req -new -x509 -keyout ca-key -out ca-cert -days 365 | |
#Add generated CA to the trust store | |
keytool -keystore kafka.server.truststore.jks -alias CARoot -import -file ca-cert |
1) Filter Table
Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Flushing all rules | |
iptables -F FORWARD | |
iptables -F INPUT | |
iptables -F OUTPUT | |
iptables -X | |
# Setting default filter policy | |
iptables -P INPUT DROP | |
iptables -P OUTPUT DROP | |
iptables -P FORWARD DROP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: shell-script; -*- | |
# | |
# Coova-Chilli Default Configurations. | |
# To customize, copy this file to /etc/chilli/config | |
# and edit to your liking. This is included in shell scripts | |
# that configure chilli and related programs before file 'config'. | |
HS_LOC_ID="1" | |
HS_LOC_NAME="xxxxxx" | |
HS_NASID="xxxxx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install -y g++ automake autoconf libtool libltdl-dev gengetopt make cmake libssl-dev libjson-c2 libjson-c-dev | |
git clone https://github.com/coova/coova-chilli | |
./bootstrap | |
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \ | |
--sysconfdir=/etc --localstatedir=/var --enable-largelimits \ |
1) Filter Table
Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.