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 / cowsayd
Last active September 29, 2016 16:01
#!/bin/sh
#
# cowsayd Start/Stop the cowsayd daemon.
#
# chkconfig: 2345 90 60
# description: cowsayd is a minimal telnet server to return a fortune+cowsay cookie and exit
# Supratim Sanyal - supratim at riseup dot net
# Copy this to /etc/init.d, chmod +x and chkconfig --add.
#
# Source function library.
@tuklusan
tuklusan / openvms-vax-7.3-first-boot-from-disk
Created October 1, 2016 04:35
How to Build Your Own Digital DEC MicroVAX 3900 Running OpenVMS VAX VMS Operating System: SIMH on CentOS 7 Running OpenVMS/VAX 7.3: http://supratim-sanyal.blogspot.com/2016/10/how-to-build-your-own-digital-dec.html
KA655-B V5.3, VMB 2.7
Performing normal system tests.
40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25..
24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09..
08..07..06..05..04..03..
Tests completed.
>>>B DUA0:
(BOOT/R5:0 DUA0
@tuklusan
tuklusan / cowsayd.c
Last active October 5, 2016 00:30
Complete description of Free Online Public FORTUNE - COWSAY Server : Fun with TELNET and C/C++ Linux Multi-threaded Socket Server Programming (CentOS 7) is at http://supratim-sanyal.blogspot.com/2016/09/free-online-public-fortune-cowsay.html
/* +++
Supratim Sanyal's COWSAY server
- If a connection is made to its network port, and if fortune and cowsay are
- installed, this waits for some input and returns a random fortune cookie formatted by cowsay
-
- to build: gcc -o cowsayd -lpthread cowsayd.c
- on Centos 7, install fortune with yum install fortune-mod
- and install cowsay from rpm at http://www.melvilletheatre.com/articles/el7/
-
- derived from Brain Damaged web server (http://supratim-sanyal.blogspot.com/2016/07/httpd410server-tiny-free-web-server-to.html)
@tuklusan
tuklusan / vax.ini-improved
Last active October 8, 2016 12:23
How to Build Your Own Digital DEC MicroVAX 3900 Running OpenVMS VAX VMS Operating System: SIMH on CentOS 7 Running OpenVMS/VAX 7.3: http://supratim-sanyal.blogspot.com/2016/10/how-to-build-your-own-digital-dec.html
; vax.ini
; autoboots from default disk, and exits emulator when vax halts
; provides two NICs
; uses a system disk larger than real vax can support
;
; See How to Build Your Own Digital DEC MicroVAX 3900 Running
; OpenVMS VAX VMS Operating System: SIMH on
; CentOS 7 Running OpenVMS/VAX 7.3:
; http://supratim-sanyal.blogspot.com/2016/10/how-to-build-your-own-digital-dec.html
;
@tuklusan
tuklusan / fail2ban.local
Last active October 21, 2016 15:03
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/fail2ban.local
# solaris 11 openindiana
# See http://supratim-sanyal.blogspot.com/2016/09/fail2ban-intrusion-prevention-on.html for details
[Definition]
logtarget = /var/adm/fail2ban.log
#loglevel = DEBUG
loglevel = INFO
@tuklusan
tuklusan / jail.local
Last active October 21, 2016 15:16
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/jail.local
# solaris 11 openindiana
# See http://supratim-sanyal.blogspot.com/2016/09/fail2ban-intrusion-prevention-on.html for details
[DEFAULT]
# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not
# ban a host which matches an address in this list. Several addresses can be
# defined using space separator.
# Whitelist private IPs, blocklist.de IPs and Uptime Robot IPs
# ignoreip = 127.0.0.1/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
@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 / etc sysconfig iptables
Created October 27, 2016 12:03
Simple Starter Iptables with Security: 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
# Basic iptables initial rules for servers
# Protects from common attacks and opens up service ports to incoming connections
#
# See http://supratim-sanyal.blogspot.com/2016/09/centos-7-network-hardening-how-to_19.html
#
# Supratim Sanyal <supratim at riseup dot net>
# ----------------------------
@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 / WASD_CONFIG_SERVICE.CONF
Last active November 6, 2016 13:59
[WASD_ROOT.LOCAL]WASD_CONFIG_SERVICE.CONF | Installation and Configuration of a basic WASD HTTP Web Server on Digital DEC OpenVMS VAX 7.3: http://supratim-sanyal.blogspot.com/2016/11/install-wasd-openvms-web-server-simple.html
# ------------------------------
# [WASD_ROOT.LOCAL]wasd_config_service.conf
# ------------------------------
# INSTALL AND CONFIGURE A BASIC WASD WEB SERVER
# ON OPENVMS VAX 7.3
#
# FULL INSTALLATION AND CONFIGURATION PROCEDURE:
# http://supratim-sanyal.blogspot.com/2016/11/install-wasd-openvms-web-server-simple.html
#
# SUPRATIM SANYAL