Skip to content

Instantly share code, notes, and snippets.

View juliocbc's full-sized avatar

Julio Cesar Camargo (JCC) juliocbc

View GitHub Profile
#!/bin/sh
# Copyright (C) 2019 Cloudfence - Julio Camargo
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
@juliocbc
juliocbc / errorpage.css
Created November 28, 2021 18:36
OPNsense proxy error page template - Cloudfence logo
/*
* Copyright (C) 1996-2020 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Please see the COPYING and CONTRIBUTORS files for details.
*/
/*
Stylesheet for Squid Error pages
@juliocbc
juliocbc / acme_plugin_patch.md
Last active September 30, 2021 01:19
OPNsense - Let's Encrypt X3 CA expiration fix (acme plugin)

Steps guidance kindly provided by Frank Wall on Twitter

USE AT YOUR OWN RISK

Tested on OPNsense 20.7.8_4 (may work on newer versions)

Download updated acme packages:

fetch https://pkg.opnsense.org/FreeBSD:12:amd64/21.7/latest/All/acme.sh-3.0.0.txz

fetch https://pkg.opnsense.org/FreeBSD:12:amd64/21.7/latest/All/os-acme-client-3.1.txz

@juliocbc
juliocbc / opnsense-ar.sh
Created July 12, 2021 12:45
OPNsense active response script
#!/bin/sh
#Active response script for OPNSense platform (should work with pfSense too)
# should be in <OSSEC_PATH>/active-response/bin/opnsense.sh
#TrustUX Network 20160803 by JCC
#Block the offensor IP in the virusprot table - default in pfSense's/OPNSense's
#ref.: https://doc.pfsense.org/index.php/Virusprot
#Tested on OPNSense 16.7 and pfSense 2.2.x
#VARs
PFCTL_CMD="/sbin/pfctl"
@juliocbc
juliocbc / 99-factory_defaults
Created March 31, 2021 19:28
OPNsense - Factory Defaults example script (using sound instead reset button)
#!/bin/sh
# Copyright (c) 2021 Cloudfence - Julio Camargo
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#