Squid Proxy Quick Reference

Posted on April 28, 2018 Useful debugging commands # get the basic status of Squid squid -k check | echo $? # check the squid configuration for errors squid -k parse # test connectivity to the chosen site squidclient -h <squidendpoint> -p3128 http://<testurl> # get list of recent attempts to reach forbidden sites grep -nR '/403' /var/log/squid/access.log # get real-time list of sites forbidden by Squid tail -f /var/log/squid/access.log | grep '/403' # get useful information about the proxy process and tail logs systemctl status squid # if you change the squid config and want to run it on the existing server systemctl reload squid # restart the proxy systemctl restart squid # get the feed of Squid logs journalctl -u squid [Read More]

AWS CLI Query Quick Reference

Posted on September 23, 2017 #!/bin/bash -ex export AWS_REGION=your-region-here export AWS_PROFILE=your-cli-access-profile-here export AWS_DEFAULT_OUTPUT=text # Get your user ARN aws iam get-user --query 'User.Arn' # Get the list of key pairs available to an account sorted alphabetically aws ec2 describe-key-pairs \ --query 'KeyPairs[*].[KeyName] | sort(@)' # List account role ARNs aws iam list-roles --query 'Roles[].Arn' # List instance ID's by name tag using filter aws ec2 describe-instances \ --filter 'Name=tag:Name,Values=instance-name-here' \ --query 'Reservations[*]. [Read More]