Categories
CentOS 7 Operating Systems

How to enable ip forwarding on CentOS 7

I wanted to enable IP masquerading/forwarding on CentOS 7.5, but for some reason, the typical method was not working. My clients could connect, but no traffic was passing beyond the VPS, and on to the internet. I was pretty sure it was my firewall masquerade rule was acting up, but no. It ended up being the kernel routing that you typically set in /etc/sysctl.conf as

net.ipv4.ip_forward = 1 I also tried net.ipv4.conf.default.forwarding = 1

I ended up needing to use the new method, which was actually in the top comment section of the sysctl.conf file. Which refernces using /usr/lib/sysctl.d/50-default.conf
add this line to the bottom of that file: net.ipv4.ip_forward = 1

Reboot, problem solved, started routing traffic outside of the VM.

Categories
Computer Hardware HP VMWare ESXi

HP GEN8 Microserver Raid 5 transform times with 4x8TB WD RED’s

I opted to drop a 4th 8TB WD RED in my raid 5 array on my HP Microserver Gen8. It has a P222 raid card in it running the latest, as of today firmware: 8.32. I had the server running for about 2 years in it’s current configuration, with no issues, but I wanted a little more disk. If I had more slots, I would have opted for a raid 10, but I wanted smaller footprint, so this is what I am working with.

So far the transform has been about 36 hours, and running:

/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=1 ld 1 show

in ESX 6.7, I am at 40%, oooofta. I imagine rebuilds with these large disks would be just as painful. Good news though, Unrecoverable Media Errors is 0.

MAKE SURE YOU HAVE BACKUPS, AND THAT YOU TEST SAID BACKUPS!!
MAKE SURE YOU HAVE BACKUPS, AND THAT YOU TEST SAID BACKUPS!!

Also make backups before you toy around with your raid, I have backups if this goes south, but always have backups.

Did I mention, HAVE BACKUPS AND TEST SAID BACKUPS!!

Categories
Android

Lenovo Tab 8 plus and Tab 10 plus to get Android 8 – OREO!

I am so pumped, I am glad they’re updating it. So far still my favorite tablet out there. I have been getting security updates every month or so, and now confirmed to have Android 8/OREO!

SOURCE: https://support.lenovo.com/us/en/solutions/ht501098

Tab4 8 Plus Tablet (TB-8704F, TB-8704X) Android 7.1 Nougat Android 8.1 (Oreo) Nov 2018 In progress
Tab4 10 Tablet (TB-X304F, TB-X304L, TB-X304X) Android 7.1 Nougat Android 8.1 (Oreo) Nov 2018 In progress
Tab4 8 Tablet (TB-8504F, TB-8504X) Android 7.1 Nougat Android 8.1 (Oreo) Nov 2018 In progress

Categories
Android Electronics

Lenovo Tab 4 8 Plus TB-8704X 64GB review in the US

Hi! So it took some digging, but I was able to acquire one of these tablets. So far I’m digging it, LTE on T-Mobile works great. Speeds are fast!

If anyone is interested in some specific tests/benchmarking, let me know. I’m more then willing to help someone decide if this is the tablet to get.

Categories
Operating Systems Windows 10 Windows 7 Windows 8

Ever want to bring up windows explorer from command prompt?

It’s super simple actually, just type “start .” without quotes. That will bring up the current directory in windows explorer. If you want to bring up another directory outside of the one you are in, just type “start C:\users\” as an example. If you want a network share: “start \\10.10.10.33\share\” and hit enter.

Easy 🙂

Categories
Operating Systems Windows 10 Windows 7 Windows 8

need to have your windows 10, windows 8, or windows 7 PC auto log you in?

Simple! Go to start, and run. Type in netplwiz and hit OK. Click on “Users must enter a user name and password to use this computer”, it will prompt for your password, and click ok, and you are done. It shoudl auto log you in!

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: Rosewill Accessory RHRC-11002 coupled with this older Intel NUC DN2820FYKH

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}