Skip to content

Instantly share code, notes, and snippets.

View andrew-azarov's full-sized avatar
🍊
Focusing

Andrew Azarov andrew-azarov

🍊
Focusing
View GitHub Profile
#### General PFCTL Commands ####
$ pfctl -d disable # packet-filtering
$ pfctl -e enable # packet-filtering
$ pfctl -q # run quiet
$ pfctl -v -v # run even more verbose
#### Loading PF Rules ####
$ pfctl -f /etc/pf.conf # load /etc/pf.conf
$ pfctl -n -f /etc/pf.conf # parse /etc/pf.conf, but dont load it
$ pfctl -R -f /etc/pf.conf # load only the FILTER rules
$ pfctl -N -f /etc/pf.conf # load only the NAT rules
@andrew-azarov
andrew-azarov / openssh-7.6-ubuntu-16.04.sh
Created April 11, 2022 12:25 — forked from prbinu/openssh-7.6-ubuntu-16.04.sh
How to build (and install) OpenSSH 7.6 packages on Ubuntu-16.04
# on a fresh Ubuntu 16.04 host
sudo apt-get update
# copy Ubuntu source packages from http://archive.ubuntu.com/ubuntu/pool/main/o/openssh
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1-4.dsc
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1.orig.tar.gz
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1.orig.tar.gz.asc
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1-4.debian.tar.xz
@andrew-azarov
andrew-azarov / README.md
Created February 12, 2022 20:42 — forked from hiway/README.md
Creating a single process FreeBSD (12.1) Jail

How to jail a single process web server on FreeBSD 12.1

You may have found many great resources on how to set up jails on latest FreeBSD, however there is scant information on how to go about creating a barebones jail with nothing but the one process that you want to isolate.

I was curious if I could contain a statically compiled web server that I wrote while learning Rust all by itself in a jail instead of having a full userland.

Get-ChildItem "E:\*\winver\amd64\" -Recurse -Filter "*.inf" |
ForEach-Object { PNPUtil.exe -i -a $_.FullName }