Friday, May 8, 2015

HP Procurve & VMWare & VLAN


Default VLAN - leave it alone - all ports left untagged


HP Switch - create a trunk - combines multiple ports into one logical port.
conf
trunk 10-13 trk1 trunk

to see it -> show trunk


VMWare side - set the vSwitch load balancing properties to "Route based on IP hash"


Voice VLAN - ID 2
- create vlan and assign IP
- add ports ( tag them )


create VLAN's on all switches
create trunk ports (multiple ports for speed) , tag the trunks with the vlans
enable routing on the "core or main" switch

Monday, March 23, 2015

Exchange 2010 Powershell

Use to find messages sent TO any users at a domain ,  domain.com

Get-MessageTrackingLog -ResultSize Unlimited -Start "04/1/2014" -End "12/29/2014" | where{$_.recipients -like "*@domain.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt

Use to find messages RECEIVED from a domain, domain.com

Get-MessageTrackingLog -ResultSize Unlimited -Start "04/1/2014" -End "12/29/2014" | where{$_.sender -like "*@domain.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt

Wednesday, March 4, 2015

Patch / Update / Downgrade ESXi



- place host into maintenance mode

- connect to host using SSH

- allow outbound http-client connections in local firewall,
esxcli network firewall ruleset set -e true -r httpClient

- view available Image Profiles,
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

- install a new Image Profile,
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard

- downgrading, add --allow-downgrades
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard --allow-downgrades

Standard profiles will include VMWare tools

- reboot the host

- when done, disable the http-client in local firewall,
esxcli network firewall ruleset set -e false -r httpClient

Thursday, February 26, 2015

MDT Captures not working

Not being prompted during capture process for image name and so on....

First, be sure in CustomSettings.ini you have set,
SkipCapture=NO

Next, edit the CustomSettings.ini file and comment out the following lines  (add  ;  ),
;JoinDomain=DOMAIN
;DomainAdmin=USERNAME
;DomainAdminDomain=DOMAIN
;DomainAdminPassword=PASSWORD

Wednesday, December 3, 2014

Apache Stuff

Hide Apache server version/information,

ServerSignature Off
ServerTokens Prod


Show custom error messages, do for common or well known error codes,

ErrorDocument 400 /myerrorpage.html
ErrorDocument 401 /myerrorpage.html
ErrorDocument 403 /myerrorpage.html
ErrorDocument 404 /myerrorpage.html
ErrorDocument 405 /myerrorpage.html
ErrorDocument 500 /myerrorpage.html


Allow only known versions of HTTP protocol,

RewriteEngine On
RewriteCond %{THE_REQUEST} !HTTP/(0\.9|1\.[01])$
RewriteRule .* - [F]


Reduce the timeout in Apache

Default is 300 seconds (5 minutes), safe to reduce this to 60 seconds.  Also, KeepAlive should be on but also reduce its timeout.
Timeout 60
KeepAlive On
KeepAliveTimeout 25


Hide the PHP version

Find the php.ini file and look for,
expose_php=ON
change it to,
expose_php=Off


Protect from Cross Site Scripting

<IfModule mod_headers.c>
    Header set X-XSS-Protection: "1; mode=block"
</IfModule>















CentOS 7 services

Start service,
systemctl start NAME.SERVICE

Stop service,
systemctl stop NAME.SERVICE

Status,
systemctl status NAME.SERVICE   , add -l for more information


Enable the service so it starts at startup / boot
systemctl enable NAME.SERVICE

CentOS 7 run level info

Run levels in CentOS 7 are not set in /etc/inittab anymore.  Systemd uses targets instead of run levels.  You can change the default run level by using the systemctl command or making symlinks.


Check the current run level
systemctl get-default


Check available targets
systemctl list-units --type=target


Change default to run level 3
systemctl set-default multi-user.target


Change default to run level 5
systemctl set-default graphical.target


Using SymLinks

run level 3, ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

run level 5, ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target