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 / gist:01616ac8bfb3be56067019102bf74ab3
Last active November 20, 2016 20:21
RSX-11M-PLUS on DEC PDP-11/24 with DECnet, BASIC PLUS 2, DIBOL, PASCAL, C AND COBOL PART 5 | Wrapping Up - Startup Scripts etc. -
[openvms@sanyalnet-cloud-vps2 pdp11]$ ###################
[openvms@sanyalnet-cloud-vps2 pdp11]$ # BASED ON THE FABULOUS INSTRUCTIONS AT http://pdp2011.sytse.net/wordpress/install-5/
[openvms@sanyalnet-cloud-vps2 pdp11]$ ###################
[openvms@sanyalnet-cloud-vps2 pdp11]$
[openvms@sanyalnet-cloud-vps2 pdp11]$ # ---------------------------------
[openvms@sanyalnet-cloud-vps2 pdp11]$ # HERE IS PDP11.INI initialization file for SIMH PDP11
[openvms@sanyalnet-cloud-vps2 pdp11]$ # ---------------------------------
[openvms@sanyalnet-cloud-vps2 pdp11]$ cat pdp11.ini
set cpu 11/70
set cpu 2m
@tuklusan
tuklusan / adblocker-dnsmasq.sh
Last active February 12, 2017 21:01
Create Your Own ad-blocker, malware blocker and ransomware blocker internet security gateway: http://supratim-sanyal.blogspot.com/2016/07/add-simple-ad-blocker-with-dnsmasq-to.html
#!/bin/bash
# --
# adblocker-dnsmasq.sh
# Rev 6
#
# Complete guide to creating your own ad-blocking, malware blocking and ransomware-blocking internet gateway:
# http://supratim-sanyal.blogspot.com/2016/07/add-simple-ad-blocker-with-dnsmasq-to.html
#
# Assuming dnsmasq is configured so that it reads configuration files from /etc/dnsmasq.d, this
@tuklusan
tuklusan / zerofill.sh-solaris
Last active July 4, 2022 23:25
Zero Out Free Disk Space on Virtual Machines and Compact them Before Backup: Solaris, Linux, Windows, OpenVMS: http://supratim-sanyal.blogspot.com/2016/12/zero-out-free-disk-space-on-virtual.html
#!/bin/bash -x
#
# ---
# zerofill.sh
# ---
#
# Poor man's zerofill to fill up unusued space with zeroes
# for better compaction of virtual hard-disk.
#
# For my simple solaris 11 openindiana installation, this zeroes out empty
@tuklusan
tuklusan / zerofile.c-openvms
Last active December 3, 2016 13:29
Zero Out Free Disk Space on Virtual Machines and Compact them Before Backup: Solaris, Linux, Windows, OpenVMS: http://supratim-sanyal.blogspot.com/2016/12/zero-out-free-disk-space-on-virtual.html
/* ------------
zerofile.c
Creates a file zerofile.zero in current directoy. This file is as big as disk space allows.
The file zerofile.zero must be deleted after this program exits and before backing up this
SIMH VM to a tarball.
Hopefully size of tarball is smaller because we wrote zeroes to all the empty space on hard
disks.
@tuklusan
tuklusan / openvms-telnet-spam-blocklist.sh
Last active July 4, 2022 23:25
Linux Bash Script to Parse OpenVMS Operator Log forwarded to Unix-Style SYSLOG on Linux, Generating auth failure audit events for fail2ban reporting to Blocklist.de. See http://supratim-sanyal.blogspot.com/2016/12/mitigate-openvms-telnet-port-brute.html
#!/bin/bash
#
# --------------------------------
# openvms-telnet-spam-blocklist.sh
# --------------------------------
#
# READS LINUX (CENTOS) SYSTEM LOG FILE, LOOKING FOR REMOTELY LOGGED OPENVMS VAX INTRUSIONS.
# FOR EACH OPENVMS INTRUDER FOUND, LOGS AN EQUIVALENT PAM AUTHENTICATION FAILURE LOG LINE.
# FAIL2BAN PICKS UP THE PAM AUTHENTCATION FAILURES AS USUAL AND REPORTS TO BLOCKLIST.DE.
# ALSO WRITES AN INFORMATIONAL SUMMARY REPORT OF BRUTE-FORCE ATTACK SOURCES.
@tuklusan
tuklusan / zerofree.sh-sophos-utm
Last active December 6, 2016 00:57
zerofree.sh for Sophos UTM - zero out unused disk space for virtual disk compaction | See http://supratim-sanyal.blogspot.com/2016/12/zero-out-free-disk-space-on-virtual.html
#!/bin/bash -x
#
# ---
# zerofree.sh (Sophos UTM)
#
# Zeroes Out Ununsed Disk Space for subsequent compacting of virtual hard disk
# Tested on Sophos UTM 9
# To execute: nice -n 19 ionice -c3 ./zerofree.sh
#
# Supratim Sanyal - supratim at riseup dot net
@tuklusan
tuklusan / gist:dc822e361963f53b16d6a85c0898f079
Created December 6, 2016 00:54
zerofree.sh for pfSense open-source router firmware - zero out unused disk space for virtual disk compaction | See http://supratim-sanyal.blogspot.com/2016/12/zero-out-free-disk-space-on-virtual.html
#!/bin/sh -x
#
# ---
# zerofree.sh (pfSense)
#
# Zeroes Out Ununsed Disk Space for subsequent compacting of virtual hard disk
# Tested on pfSense 2.3 / FreeBSD 10.3
# To execute: nice -19 ./zerofree.sh
#
# Supratim Sanyal - supratim at riseup dot net
@tuklusan
tuklusan / ntp.conf
Last active September 24, 2019 03:04
sanyalnet-cloud-vps.freeddns.org stratum-2 /etc/ntp.conf - read more at http://supratim-sanyal.blogspot.com/2017/03/free-public-stratum-2-and-stratum-3-ntp.html
# --
# SANYALnet Labs
# http://tuklusan.decsystem.org/
#
# This is Supratim Sanyal's NTP Server configuration file
# To test, use "ntpdate -q <this host>" from another host
# This server will not respond to peer queries ("ntpdc -q") etc. from
# external hosts.
#
# The stratum 1 servers used by this server are mostly educational and
@tuklusan
tuklusan / ntp.conf
Last active March 31, 2019 08:29
sanyalnet-cloud-vps2.freeddns.org stratum-2 /etc/ntp.conf - read more at http://supratim-sanyal.blogspot.com/2017/03/free-public-stratum-2-and-stratum-3-ntp.html
# --
# This is Supratim Sanyal's NTP Server configuration file
# To test, use "ntpdate -q <this host>" from another host
# This server will not respond to peer queries ("ntpdc -q") etc. from
# external hosts.
#
# The stratum 1 servers used by this server are mostly educational and
# military servers from:
# http://support.ntp.org/bin/view/Servers/StratumOneTimeServers?redirectedfrom=Servers.StratumOne
# Comment out the stratum 2 servers to make this server stratum 2 with
@tuklusan
tuklusan / ntpd.conf
Last active March 27, 2017 03:14
sanyalnet-ntp.freeddns.org stratum-2 /var/etc/ntpd.conf - read more at http://supratim-sanyal.blogspot.com/2017/03/free-public-stratum-2-and-stratum-3-ntp.html
#
# pfSense ntp configuration file
#
tinker panic 0
# Orphan mode stratum
tos orphan 16
# Upstream Servers