SUBs… grrr hard to remember :)

Net bits

Subnet mask

total-addresses per subnet

/20 255.255.240.0 4096
/21 255.255.248.0 2048
/22 255.255.252.0 1024
/23 255.255.254.0 512
/24 255.255.255.0 256
/25 255.255.255.128 128
/26 255.255.255.192 64
/27 255.255.255.224 32
/28 255.255.255.240 16
/29 255.255.255.248 8
/30 255.255.255.252 4

PFsense – Collection of things good to remember…

/etc/rc.conf_mount_rw to make filesystem temporarily writeable
/etc/rc.conf_mount_ro to set filesystem back to read-only

Restore backup and check filesystem of Pfsense Firewall

Select to boot into “single user” mode.
When you get a prompt, remount the filesystem into read/write mode using “mount -u /cf”
Check the filesystem for errors and repair them with “fsck -yf /“. or just fsck

Locate and copy the restore file from the “/cf/conf/backup/” directory.
Copy it with ”cp /cf/conf/backup/config-12121221.xml /cf/config/config.xml”
Remove the file “/tmp/config.cache” using “rm /tmp/config.cache“.

Run the command “/etc/rc.reload_all start“.

Reboot using “reboot“.

Powershell commands

kolla vad man har för version av powershell installerat…
if ($PSVersionTable.PSVersion.Major -ne 3) {Write-Host ”Version 3 NOT found!”;exit}

Download link Powershell 3.0 (2013) https://www.microsoft.com/en-us/download/details.aspx?id=34595

# Delete alla *.BAk files in all sub folders….
Get-ChildItem . -recurse | where {$_.Extension -match ”BAK”} | Remove-Item -recurse

Exchange 2010 logging

Exchange 2010 loggs files in different places… and i do seem to forget where…
So just a heads up anda areminder how to do this things…

Receive connector protocol log filesC:\ProgramFiles\Microsoft\ExchangeServer\V14\TransportRoles\Logs\ProtocolLog\SmtpReceive
Send connector protocol log filesC:\ProgramFiles\Microsoft\ExchangeServer\V14TransportRoles\Logs\ProtocolLog\SmtpSend

A good post here on the subject https://technet.microsoft.com/en-us/library/dd302434.aspx

 

 

 

TSM

Tivoli Image

Ett tsm backup script… (enbart för mitt eget minne…)

preschedulecmd e:\backup\Pre_TSM_Copy.cmd
*postschedulecmd some_batch_file

*********** DOMAINS (drives) *************
DOMAIN E: SYSTEMSTATE

*********** CATCH-ALL EXCLUDE ************
EXCLUDE ”*”

*********** ENCRYPT ALL ******************
INCLUDE.ENCRYPT ”*”

*********** USER INCLUDES/EXCLUDES ******
INCLUDE.SYSTEMSTATE ALL 3
INCLUDE.BACKUP ”e:\backup\…\” 3