Skip to content

Instantly share code, notes, and snippets.

View tuklusan's full-sized avatar
💭
trading heroes for ghosts.

Supratim Sanyal tuklusan

💭
trading heroes for ghosts.
View GitHub Profile
@tuklusan
tuklusan / mail-whois-lines.local
Last active October 21, 2016 15:25
Fail2Ban Intrusion Prevention on Solaris 11 OPENINDIANA SunOS 5.11 Illumos with Reporting to Blocklist.de: http://supratim-sanyal.blogspot.com/2016/09/fail2ban-intrusion-prevention-on.html
# /etc/fail2ban/action.d/mail-whois-lines.local
# solaris 11 openindiana
# See http://supratim-sanyal.blogspot.com/2016/09/fail2ban-intrusion-prevention-on.html for details
[Definition]
actionban = printf %%b "Hi,\n
The IP <ip> has just been banned by Fail2Ban after <failures> attempts against <name>.\n
Lines containing IP:<ip> in <logpath>\n
`/usr/gnu/bin/grep <grepopts> <ip> <logpath>`\n
Here is more information about <ip> :\n
@tuklusan
tuklusan / dump-fail2ban-blocklist.sh
Last active March 1, 2020 09:04
Got Fail2Ban working? Have a Web Server running? Post a public blocklist for others to use! Complete guide: http://supratim-sanyal.blogspot.com/2016/09/got-fail2ban-working-have-web-server.html
#!/bin/bash
#
# ------------
# /root/security/dump-fail2ban-blocklist.sh
# Dumps banned IPs into text file, for use by web-server for published blocklist
# Includes TOR exit nodes
# See http://supratim-sanyal.blogspot.com/2016/09/got-fail2ban-working-have-web-server.html
#
# License:
# "THE BEER-WARE LICENSE" (Revision 42):
@tuklusan
tuklusan / dump-fail2ban-blocklist
Last active October 30, 2019 03:44
Got Fail2Ban working? Have a Web Server running? Post a public blocklist for others to use! Complete guide: http://supratim-sanyal.blogspot.com/2016/09/got-fail2ban-working-have-web-server.html
#/etc/cron.d/dump-fail2ban-blocklist
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
MAILTO=""
HOME=/
# Every 7th minute past the hour, dump the fail2ban blocklist
7 * * * * root /root/security/dump-fail2ban-blocklist.sh >/var/log/dump-fail2ban-blocklist.log 2>&1
@tuklusan
tuklusan / iptables
Last active October 28, 2016 02:35
/etc/sysconfig/iptables | Centos 7 Network Hardening: How to Protect Your Server from Basic Network Attacks using IPTABLES Firewall - http://supratim-sanyal.blogspot.com/2016/09/centos-7-network-hardening-how-to_19.html
# ----------
# /etc/sysconfig/iptables
# Supratim Sanyal's Hobbyist Cloud VPS Server
#
# fail2ban and ip blocklist scripts add entries after boot, extending
# these initial startup filter rules
#
# See "Centos 7 Network Hardening: How to Protect Your Server from Basic Network Attacks using IPTABLES Firewall"
# at http://supratim-sanyal.blogspot.com/2016/09/centos-7-network-hardening-how-to_19.html
# ----------
@tuklusan
tuklusan / sysctl.conf
Last active March 1, 2020 09:09
/etc/sysctl.conf | Centos 7 Network Hardening: How to Protect Your Server from Basic Network Attacks using IPTABLES Firewall - http://supratim-sanyal.blogspot.com/2016/09/centos-7-network-hardening-how-to_19.html
# --
# /etc/sysctl.conf
# From "Centos 7 Network Hardening: How to Protect Your Server from Basic Network Attacks using IPTABLES Firewall"
# http://supratim-sanyal.blogspot.com/2016/09/centos-7-network-hardening-how-to_19.html
# --
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv6.conf.all.disable_ipv6 = 1
@tuklusan
tuklusan / default.vcl
Last active September 24, 2016 17:08
/etc/varnish/default.vcl - Varnish 4 Working Simple Basic default.vcl | Simple Basic Working VARNISH 4.0 Configuration: default.vcl and varnish.params for a functional web server cache - http://supratim-sanyal.blogspot.com/2016/09/simple-basic-working-varnish-40.html
# --
# /etc/varnish/default.vcl
# Minimal working Varnish 4.0 Configuration to serve static-only website pages from lighttpd backend
# From "Simple Basic Working VARNISH 4.0 Configuration: default.vcl and varnish.params for a functional web server cache"
# http://supratim-sanyal.blogspot.com/2016/09/simple-basic-working-varnish-40.html
# --
vcl 4.0;
backend default {
@tuklusan
tuklusan / varnish.params
Created September 24, 2016 17:19
/etc/varnish/varnish.params - Varnish 4 Working Simple Basic varnish.params | Simple Basic Working VARNISH 4.0 Configuration: default.vcl and varnish.params for a functional web server cache - http://supratim-sanyal.blogspot.com/2016/09/simple-basic-working-varnish-40.html
# --
# /etc/varnish/varnish.params
# Minimal working Varnish 4.0 Configuration to serve static-only website pages from lighttpd backend
# From "Simple Basic Working VARNISH 4.0 Configuration: default.vcl and varnish.params for a functional web server cache"
# http://supratim-sanyal.blogspot.com/2016/09/simple-basic-working-varnish-40.html
# --
# Varnish environment configuration description. This was derived from
# the old style sysconfig/defaults settings
# Set this to 1 to make systemd reload try to switch vcl without restart.
@tuklusan
tuklusan / lighttpd.conf
Created September 24, 2016 18:53
/etc/lighttpd/lighttpd.conf - VARNISH 4 Working Simple Basic Configuration with LIGHTTPD | Simple Basic Working VARNISH 4.0 Configuration: default.vcl and varnish.params for a functional web server cache - http://supratim-sanyal.blogspot.com/2016/09/simple-basic-working-varnish-40.html
#######################################################################
##
## /etc/lighttpd/lighttpd.conf
## Minimal working Varnish 4.0 Configuration to serve static-only website pages from lighttpd backend
## From "Simple Basic Working VARNISH 4.0 Configuration: default.vcl and varnish.params for a functional web server cache"
## http://supratim-sanyal.blogspot.com/2016/09/simple-basic-working-varnish-40.html
##
## check /etc/lighttpd/conf.d/*.conf for the configuration of modules.
##
#######################################################################
@tuklusan
tuklusan / global_prefs.xml
Created September 26, 2016 17:46
The Definitive How-To for BOINC with SETI@HOME on Fedora / CentOS / RedHat Linux (x64 / x86): http://supratim-sanyal.blogspot.com/2016/09/the-definitive-how-to-for-boinc-with.html
<global_preferences>
<source_project>http://setiathome.berkeley.edu/</source_project>
<source_scheduler>http://setiboinc.ssl.berkeley.edu/sah_cgi/cgi</source_scheduler>
<mod_time>1337766618</mod_time>
<run_on_batteries>1</run_on_batteries>
<run_if_user_active>0</run_if_user_active>
<run_gpu_if_user_active>1</run_gpu_if_user_active>
<idle_time_to_run>15</idle_time_to_run>
<suspend_if_no_recent_input>0</suspend_if_no_recent_input>
@tuklusan
tuklusan / simh-vax-build-output
Last active September 7, 2017 04:30
A complete guide to installing a DEC Digital VAX running OpenVMS using SIMH simulatar: http://supratim-sanyal.blogspot.com/2016/10/how-to-build-your-own-digital-dec.html
$ make USE_READER_THREAD=1 USE_TAP_NETWORK=1 USE_INT64=1 vax vax780 pdp11 pdp8
lib paths are: /lib/ /lib/i386-linux-gnu/ /lib64/ /libx32/ /usr/lib/ /usr/lib/i386-linux-gnu/ /usr/lib/i386-linux-gnu/i686/cmov/ /usr/lib/i386-linux-gnu/i686/sse2/ /usr/lib/i386-linux-gnu/mesa-egl/ /usr/lib/i386-linux-gnu/mesa/ /usr/lib/i386-linux-gnu/mir/clientplatform/mesa/ /usr/lib/i386-linux-gnu/sse2/ /usr/lib/sse2/ /usr/lib64/ /usr/libx32/
include paths are: /usr/include
using libm: /usr/lib/i386-linux-gnu/libm.so
using librt: /usr/lib/i386-linux-gnu/librt.so
using libpthread: /usr/lib/i386-linux-gnu/libpthread.so /usr/include/pthread.h
using libpcreposix: /usr/lib/i386-linux-gnu/libpcreposix.so /usr/include/pcreposix.h
using libdl: /usr/lib/i386-linux-gnu/libdl.so /usr/include/dlfcn.h
using mman: /usr/include/sys/mman.h
using libSDL2: /usr/include/SDL2/SDL.h