Categories
Linux linux pfsense

Creating firewall rules for pfsense to block cameras from going out

I installed pfSense 2.4.1, to replace my Asus AC68U as my router, and purchased an Ubiquiti UAP-AC-PRO for my wireless. So far so good, but I had one thing I REALLY wanted done with this new firewall, that my old one could not, and that was properly blocking all traffic going OUT, except NTP, and DNS to resolve those NTP entries. So my set up was as follows:

If you want me to get into each of the rules, let me know and I can. It works great, as I can see it allowing the NTP and DNS entries. This works best if your DNS server is your router/gateway. If it is not, you will have to substitute in what your DNS servers are. I am waiting for something to call home, so I can then report that to FDT, my camera manufacturer, and ask them WHY is it calling home?!

Categories
Operating Systems Software

Having issues with pfsense booting or crashing on ESX 6.5?

I had just installed a fresh copy of pfsense on my HP GEN8 Microserver, and noticed it would not like booting up, sometimes. So I ended up removing the USB SATA controller, and that resolved it. Why? I am not sure…I remember reading that someone else had a similar issue before as well.

Categories
vmware

vmware upgrade 6.5 alerted for removal of VIBS

I had ran this command:
esxcli software profile install -p ESXi-6.5.0-20171004001-standard -d https://hostupdate.vmware.com/software/VUM/PRODU
to upgrade to the latest version of 6.5 vmware ESXi and I got this message:

[Exception]
You attempted to install an image profile which would have resulted in the removal of VIBs [‘HPE_bootbank_hpe-cru_650.6.5.8.24-1.4240417’, ‘HPE_bootbank_hponcfg_6.0.0.4.4-2.4.2494585’, ‘HPE_bootbank_scsi-hpvsa_5.5.0.102-1OEM.550.0.0.1331820’, ‘HPE_bootbank_hpe-esxi-fc-enablement_650.2.6.10-4240417’, ‘HPE_bootbank_hptestevent_6.0.0.01-01.00.5.2494585’, ‘HPE_bootbank_hpe-ilo_650.10.0.1-24.4240417’, ‘HPE_bootbank_ssacli_2.65.7.0-6.5.0.4240417’, ‘HPE_bootbank_hpbootcfg_6.0.0.02-02.00.6.2494585’, ‘HPE_bootbank_hpe-smx-provider_650.03.11.00.17-4240417’, ‘HPE_bootbank_amshelper_650.10.6.0-24.4240417’, ‘HPE_bootbank_conrep_6.0.0.01-02.00.1.2494585’]. If this is not what you intended, you may use the esxcli software profile update command to preserve the VIBs above. If this is what you intended, please use the –ok-to-remove option to explicitly allow the removal.
Please refer to the log file for more details.

I wanted to keep those VIBs because I know there were no upgrades for HP on them, so I ran an update command instead:

esxcli software profile install -p ESXi-6.5.0-20171004001-standard -d https://hostupdate.vmware.com/software/VUM/PRODU

Categories
vmware

vmware 6.5 upgrade failed with no space left on device

I was running the upgrade on my HP microserver Gen 8 ESXi host, and it threw an error:

[root@esx1:~] esxcli software profile update -p ESXi-6.5.0-20171004001-standard -d https://hostupdate.vmware.com/software/VUM/PRODU
CTION/main/vmw-depot-index.xml
[InstallationError]
[Errno 28] No space left on device
vibs = VMware_locker_tools-light_6.5.0-0.23.5969300
Please refer to the log file for more details.
[root@esx1:~]

I ended up having to install the locker tool first:

cd /tmp
wget http://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_6.5.0-0.23.5969300.vib
esxcli software vib install -f -v /tmp/VMware_locker_tools-light_6.5.0-0.23.5969300.vib

Then I ran the update, and it worked perfect!

Categories
Software

easyazon discount code only $17

I got lucky, and thanks to warrior forum, I found a link from cyber monday to get the plugin for $17!

You can use this link:

https://boostwp.samcart.com/products/easyazon-pro-multi-rights-cyber-monday-special

Categories
INTEL NUC Kodi Windows 10

Windows 10 1607 anniversary update broke my RC6 remote KODI/XBMC

My RC6 remote up and broke on my when I updated Windows 10 to update 1607 ‘anniversary’ edition in Windows 10 on my Intel NUC. Long story short, I found out what it was, huzzah!

This was the remote I used: [easyazon_link identifier=”B01H1XUTYK” locale=”US” tag=”vivithemage-20″]Rosewill Accessory RHRC-11002[/easyazon_link] coupled with this older [easyazon_link identifier=”B00HVKLSVC” locale=”US” tag=”vivithemage-20″]Intel NUC DN2820FYKH [/easyazon_link]

So I had some free time to dig around on this on my own. Oddly enough, I had a back up from 2015 of this system, so I went to check my registry, and found out that this bit of the hive is volatile (only stored in memory), so I looked at the older ones in that save under currentcontrolset001/002 and found one difference. On my running system I went to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da\

and changed:

“CodeSetNum0″=dword:00000008

to:

“CodeSetNum0″=dword:00000001

GOOD TO GO, works fine now.

Oy. I don’t even remember what told me to change it to 8 in the first place.

Categories
Windows 10 Windows 8

Windows 10 or 8 System Interrupts causing high CPU usage

I had a few laptops where the system interrupt process was consuming 10-15% CPU. The one thing that seemed to have worked was disabling ‘turn on fast startup’ in the power settings.

Hit your start button and type power options and click on the power options.
Left side, ‘chose what the power buttons do’ click on that.
At the top of this page, click ‘Change settings that are currently unavailable’
Scroll to teh bottom, and uncheck ‘Turn on fast startup (recommended) and click save.
You can reboot, but this should solve the problem.

IF not, you might have a bad driver and need to try disabling hardware until you see the issue go away, and then work on updating that driver.

power

UPDATE:

I also found that disabling hibernation will remove this option completely. You can do this via CMD or POWERSHELL:

POWERSHELL:
powershell -Command "Start-Process 'powercfg.exe' -Verb runAs -ArgumentList '/h off'"

COMMAND PROMPT:
powercfg -h off

Categories
Powershell Windows 10 Windows 7

Running batch and powershell scripts as administrator

WINDOWS – RUN BATCH AND PS AS ADMINISTRATORS. This works for Windows 7 and newer. I tested on Windows 7 and 10 64bit and 32bit.

This is a faster vbs version of the below script:
net sess>NUL 2>&1||(echo.CreateObject^(“Shell.Application”^).ShellExecute”%~0″,,,”RunAs”,1 >”%TEMP%\%~nx0.vbs”&WScript “%TEMP%\%~nx0.vbs”&del “%TEMP%\%~nx0.vbs”&exit)

#RUNNING CMD/BAT files as administrator, place this at the top of script after @echo off
net sess>NUL 2>&1||(powershell saps ‘%0’-Verb RunAs&exit)

#RUNNING PS1 FILES as administrator, place this at the top, before all other commands.
# Run this if you need to be running as ADMINISTARTOR
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”))
{
$arguments = “& ‘” + $myinvocation.mycommand.definition + “‘”
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}
####################################################

SOURCE: http://www.sevenforums.com/general-discussion/12936-how-run-batch-file-admin-3.html#post3084570

Categories
powershell Programming scripting Windows 10 Windows 7 Windows 8

creating batch file to kick off powershell script in different versions of windows with different commands

I needed the ability to have a powershell script execute specific ways for specific versions of windows, so after some googling, I hodge podged this. Essentially you will run this script first, as a cmd, or batch file:

@echo off
setlocal
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
REM Windows 10 is called be low this
if "%version%" == "10.0" powershell "C:\LocalAdminPolicyUpdate\LocalAdminPolicyUpdate.ps1"
REM Windows 8.1
if "%version%" == "6.3" powershell "C:\LocalAdminPolicyUpdate\LocalAdminPolicyUpdate.ps1"
REM Windows 8
if "%version%" == "6.2" powershell "C:\LocalAdminPolicyUpdate\LocalAdminPolicyUpdate.ps1"
REM Windows Vista
if "%version%" == "6.0" echo Windows Vista.
REM Windows 7
if "%version%" == "6.1" powershell "Set-ExecutionPolicy Unrestricted" && powershell C:\LocalAdminPolicyUpdate\LocalAdminPolicyUpdate.ps1
endlocal

and then this script, labeled LocalAdminPolicyUpdate.ps1 reload the script if it is not running as an admin. This section works for Windows 8+, and does not flag/error on Windows 7, which is why I needed the previous script to kick off ‘what version’ is the OS to run it elevated. I also am running these on PC’s WITHOUT UAC. If you have UAC, the user will get prompted to hit YES on the UAC popup.

The next bit finds all users in the local administrator group, and removes specific users with the $Group.Remove section, and then adds with the $Group.Add. I also added some debugging stuff to see what echo’d out to show me if it exists and it is truely seeing each user.

# Adds local uesr to local administrators account and removing software loaders
# revision 1
# created 2016-04-26

# Run this if you need to be running as ADMINISTARTOR
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}
####################################################

$members = net localgroup administrators | where {$_ -AND $_ -notmatch "command completed successfully"} | select -skip 4
#write-output $members

$Computer = $env:COMPUTERNAME
$GroupName = 'Administrators'
$User = $env:USERNAME

$ADSI = [ADSI]("WinNT://$Computer")
$Group = $ADSI.Children.Find($GroupName, 'group')

if ($members -notcontains "E500NT\$env:USERNAME") {
$Group.Add(("WinNT://e500nt/$user"))
}
if ($members -contains "E500NT\Software Loaders") {
$Group.Remove(("WinNT://e500nt/Software Loaders"))
}
if ($members -notcontains "E500NT\ISTechGroup") {
$Group.Add(("WinNT://e500nt/ISTechGroup"))
}
if ($members -notcontains "E500NT\Domain Admins") {
$Group.Add(("WinNT://e500nt/Domain Admins"))
}
#if ($members -contains "E500NT\$env:USERNAME") { echo 1}
#if ($members -contains "E500NT\ISTechGroup") { echo 2}
#if ($members -contains "E500NT\Domain Admins") { echo 3}
#if ($members -notcontains "E500NT\Software Loaders") { echo 4}

Categories
Windows 10

Disabling UAC in Windows 10 but keeping built in apps working like metro apps and edge

If you need to disable UAC, but want to keep the ability to use built in metro apps, like Edge, you can run this:

cmd /c REG ADD “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System” /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 00000000 /f
cmd /c REG ADD “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System” /v PromptOnSecureDesktop /t REG_DWORD /d 00000000 /f

If you want some specifics on what other things you can modify to tweak the way UAC handles prompts you can view them here: https://msdn.microsoft.com/en-us/library/cc232762.aspx

There are a few more registry settings you can change, but with these two, in Windows 10, you will at least be able to keep metro apps running. If you want to disable UAC entirely in Windows 10 you can run this:

cmd /c REG ADD “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System” /v EnableLUA /t REG_DWORD /d 00000000 /f

This will disable UAC, and kill all metro app usage.