Skip to content

Instantly share code, notes, and snippets.

💭
Working on https://github.com/dlangille/thin_to_thick

Dan Langille dlangille

💭
Working on https://github.com/dlangille/thin_to_thick
Block or report user

Report or block dlangille

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dlangille
dlangille / the details
Last active Jul 17, 2019
Upgrading packages after major upgrade
View the details
# For me, I need to update this file and adjust the repo it uses.
/usr/local/etc/pkg/repos/local.conf
#
#e.g:
#
#local: {
# url: "pkg+http://fedex.unixathome.org/packages/120amd64-default-master-list/"
# mirror_type: "srv",
@dlangille
dlangille / pfSense
Last active Jun 25, 2019
When IPv6 he.net Hurricane Electric connection is down
View pfSense
1 - See if you can ping the he.net tunnel point:
$ ping 209.51.161.14
PING 209.51.161.14 (209.51.161.14): 56 data bytes
64 bytes from 209.51.161.14: icmp_seq=0 ttl=59 time=13.276 ms
64 bytes from 209.51.161.14: icmp_seq=1 ttl=59 time=9.800 ms
^C
--- 209.51.161.14 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 9.800/11.538/13.276/1.738 ms
@dlangille
dlangille / pkg
Created Jun 21, 2019
Upgrading jail after updating the OS within the jail
View pkg
alter /usr/local/etc/pkg/repos/local.conf to use new jail
pkg-static install -f pkg
pkg upgrade -f
pkg autoremove
# the above should have upgrade all packages and the following check verifies it.
# any package not upgraded, needs to be built, and added to the build list.
pkg query -a '%n %t' | awk -v t=$(date -v -6H +%s) '$2 < t { print $1 }'
View make buildkernel
cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -shared -nostdlib hack.c -o hack.pico
rm -f hack.c
MAKE="/usr/obj/usr/src/make.amd64/bmake" sh /usr/src/sys/conf/newvers.sh "-R" GENERIC
cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-er
View schedule
Scheduled Jobs:
Level Type Pri Scheduled Job Name Volume
===================================================================================
Full Backup 10 09-Jun-19 14:22 x8dtu basic FullAuto-3580
Full Backup 10 09-Jun-19 14:22 r710-01 jail snapshots FullAuto-3580
Full Backup 10 09-Jun-19 14:22 r710-01 basic FullAuto-3580
Full Backup 10 09-Jun-19 14:22 supernews FullAuto-3580
Full Backup 10 09-Jun-19 14:22 supernews basic FullAuto-3580
Full Backup 10 09-Jun-19 14:22 svn everything FullAuto-3580
Full Backup 10 09-Jun-19 14:22 svn basic FullAuto-3580
@dlangille
dlangille / Updating System
Created Jun 9, 2019
pfSense upgrade from 2.4.4_2 to 2.4.4_3 - 2019.06.09
View Updating System
>>> Updating repositories metadata...
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
>>> Removing vital flag from lang/php72... done.
>>> Downloading upgrade packages...
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
@dlangille
dlangille / Steps
Last active Apr 12, 2019
Moving from private IMAP to third party IMAP
View Steps
* Convert from maildrop to seive: https://www.mail-archive.com/dovecot@dovecot.org/msg40469.html
* Configure MX: https://www.fastmail.com/help/receive/domains-setup-mxonly.html
* imapsync
* deltest account let it keep forwarding to mailjail.langille.org
If I do the imapsync, will I lose the Fastmail mail?
View gist:ec0b4c35f63d41bf148d67cb411df218
Encryption + Installing FreeBSD
When we want to install FreeBSD we can encrypt the disks here. Our standard OS install is on two hard drives in
the back of the server or attached to the motherboard.
The image above is from the Internet does not have our standard setup options so let's change the options.
Our standard setup is the following settings:
T Pool Type - mirror 2 disk
@dlangille
dlangille / 1 - update works
Last active Apr 10, 2019
iocage Version 1.2 RC
View 1 - update works
[dan@x8dtu:~] $ sudo iocage restart mailjail2-x8dtu.langille.org
* Stopping mailjail2-x8dtu_langille_org
+ Executing prestop OK
+ Stopping services OK
+ Removing devfs_ruleset: 14 OK
+ Removing jail process OK
+ Executing poststop OK
* Ruleset 14 does not exist, using defaults
* Starting mailjail2-x8dtu_langille_org
+ Started OK
View gist:08a1ef69d3f1bf2472af7ae163a0580f
[dan@supernews:~] $ telnet avacs1.vrt.sourcefire.com 25
Trying 2620:28:c000:a2::209...
Connected to avacs1.vrt.sourcefire.com.
Escape character is '^]'.
220-mail.vrt.sourcefire.com ESMTP Postfix
220 mail.vrt.sourcefire.com ESMTP Postfix
^C^[[A^]
telnet> quit
Connection closed.
[dan@supernews:~] $ telnet -4 avacs1.vrt.sourcefire.com 25
You can’t perform that action at this time.