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
Monday, March 23, 2015
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
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>
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
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
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
Monday, November 24, 2014
Apache SSL
For Apache on CentOS SSL config
Add in ssl.conf
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCompression off ##check apache version, may not work
SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
Add in ssl.conf
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCompression off ##check apache version, may not work
SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
Subscribe to:
Posts (Atom)