Skip to content

Instantly share code, notes, and snippets.

@plembo
plembo / upnper4dont.md
Last active February 4, 2024 07:09
UPnP with EdgeRouter: Don't do it! Ubiquiti. ER-4.

Want to configure UPnP on EdgeRouter-4?

Don't do it!

Introduction

As a former sysadmin that once helped ride herd over around 1,000 servers, of which around 10% were Internet-facing, I've never been a fan of autoconfiguation when it comes to punching holes through the firewall. I've seen the tripwire logs, and it's sobering.

The Problem

So enabling UPnP on my EdgeRouter-4 wasn't something I had on the roadmap, but when I ran into difficulty getting DLNA to work on the default VLAN, I thought it was worth looking into (never mind that, as I later learned, having UPnP turned on wasn't going make a bit of difference on my local network: another reason that mastering theory should always come before practice).

@andrewgodwin
andrewgodwin / QuakeTerminal.ahk
Created February 15, 2020 17:41
AutoHotkey script for making Windows Terminal appear/disappear with a single keypress
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
F12::ToggleTerminal()
ShowAndPositionTerminal()
{
WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS
@jrgcubano
jrgcubano / funtalk.ps1
Created May 13, 2015 07:21
Fun script powershell to talk with remote computer
# Link: http://www.reddit.com/r/PowerShell/comments/1khn9o/a_fun_script_for_friday_make_your_friends/
# A fun script for Friday - make your friend's computer start talking to him/her (self.PowerShell)
# submitted 1 year ago * by Sinisterly
# A co-worker of mine stumbled upon this nifty blog article on how to make a text-to-speech call using PowerShell.
# The article gives two examples:
# - Call the SAPI.SPVoice COM object
# - Load the reference to System.Speech
# Where can this come in fun? Well, if you throw PSRemoting in, of course! In my testing, if you use the second method (or the pared down script below) you can make your victim's computer start talking to him or her. Here's how you do it:
# 1. Provide a distraction so that your victim leaves their computer unlocked, and make yourself administrator on their workstation (only needed if you aren't already an admin!)
# 2. Enable PSRemoting on their workstation. A method for doing this would be using PSExec: