Skip to content

Instantly share code, notes, and snippets.

View timstoop's full-sized avatar

Tim Stoop timstoop

View GitHub Profile
tim@mgmt1:~$ kubectl --kubeconfig=host.kubeconfig -n kube-system logs kube-apiserver-ip-10-32-4-25
I0411 12:34:14.844106 1 server.go:558] external host was not specified, using 10.32.4.25
I0411 12:34:14.846609 1 server.go:158] Version: v1.24.11
I0411 12:34:14.846694 1 server.go:160] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I0411 12:34:15.217107 1 shared_informer.go:255] Waiting for ca

Keybase proof

I hereby claim:

  • I am timstoop on github.
  • I am timstoop (https://keybase.io/timstoop) on keybase.
  • I have a public key ASD3LVdqVjGoYb4Tp-Q5hqrLGgTMk5KCPRrd4weWNdixGwo

To claim this, I am signing this object:

LogFormat "{ \"http_host\": \"%{Host}i\", \"vhost\": \"%v\", \"port\": \"%p\", \"timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \"process_time\": %D, \"clientip\": \"%a\", \"x_forwarded_for\": \"%{X-Forwarded-For}i\", \"httpversion\": \"%H\", \"handler\": \"%R\", \"agent\": \"%{User-Agent}i\", \"auth\": \"%u\", \"request_path\": \"%U\", \"query_string\": \"%q\", \"method\": \"%m\", \"request_size\": %I, \"referrer\": \"%{Referer}i\", \"response_code\": \"%>s\", \"response_size\": %O, \"response_body_size\": \"%b\", \"apache_child_process_id\": \"%{pid}P\", \"apache_child_thread_id\": \"%{tid}P\", \"cloudflare_connecting_ip\": \"%{CF-Connecting-IP}i\" }" logstash_ext_json
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'
@timstoop
timstoop / ferm.conf output
Created February 14, 2014 09:11
Detecting TCP SYN Flood
/usr/sbin/ipset -exist create active_connections hash:ip timeout 30
/usr/sbin/ipset -exist create offenders hash:ip
# Generated by ferm 2.1 on Fri Feb 14 10:02:12 2014
*filter
:FORWARD DROP [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
:active_connections - [0:0]
:prevent_tcp_syn_flood - [0:0]
-A FORWARD --protocol udp --jump DROP