November 28, 2019

Cert notes

chown root:certs /etc/pki/tls/certs/localhost.crt
chown root:certs /etc/pki/tls/private/localhost.key
chmod g+rwx /etc/pki/tls/certs/localhost.crt
chmod g+rwx /etc/pki/tls/private/localhost.key

scp /media/nas-backup/certs/wjw-walkerfamily/fullchain.cer  admin@192.168.1.40:/etc/pki/tls/certs/localhost.crt

scp /media/nas-backup/certs/wjw-walkerfamily/wjw.nz.key admin@192.168.1.40:/etc/pki/tls/private/localhost.key

Observium Application Monitoring Agent Install


yum install xinetd
scp   root@zeus:/opt/observium/scripts/observium_agent_xinetd /etc/xinetd.d/observium_agent_xinetd
service xinetd restart
scp  root@zeus:/opt/observium/scripts/observium_agent /usr/bin/observium_agent
mkdir -p /usr/lib/observium_agent
mkdir -p /usr/lib/observium_agent/local

cp /media/nas-backup/observium_agent/scripts-available/mysql* /usr/lib/observium_agent/local
cp /media/nas-backup/observium_agent/scripts-available/exim* /usr/lib/observium_agent/local
cp /media/nas-backup/observium_agent/scripts-available/postfix* /usr/lib/observium_agent/local
cp /media/nas-backup/observium_agent/scripts-available/vmwaretools /usr/lib/observium_agent/local

chmod +x /usr/bin/observium_agent

November 19, 2019

Setting up AutoDiscover for Windows Mail with imap


mkdir /var/www/html/autodiscover

nano autodiscover.xml

<?xml version="1.0" encoding="utf-8" ?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<Account>
  <AccountType>email</AccountType>
  <Action>settings</Action>
  <Protocol>
    <Type>IMAP</Type>
    <Server>mx1.wjw.nz</Server> <!--IP Addr or DNS name of server-->
    <Port>993</Port>
    <DomainRequired>on</DomainRequired>
    <SPA>off</SPA>
    <SSL>on</SSL>
    <AuthRequired>on</AuthRequired> <!-- Optional: Is Authentication required? -->
    <UsePOPAuth>on</UsePOPAuth>
    <SMTPLast>off</SMTPLast>
  </Protocol>
  <Protocol>
    <Type>SMTP</Type>
    <!--<TTL>%TTL%</TTL>-->
    <Server>mx1.wjw.nz</Server>
    <Port>25</Port>
    <DomainRequired>on</DomainRequired>
    <SPA>off</SPA>
    <SSL>on</SSL>
    <AuthRequired>on</AuthRequired>
    <UsePOPAuth>on</UsePOPAuth>
    <SMTPLast>off</SMTPLast>
  </Protocol>
</Account>
</Response>
</Autodiscover>

Letsencrypt with Zonomi

Setup acme.sh

  • git clone https://github.com/Neilpang/acme.sh.git
  • cd ./acme.sh/
  • ./acme.sh --install
  • export ZM_Key="zonomi API Key"
  • acme.sh --issue -d wjw.nz -d *.wjw.nz -d wjw.co.nz -d *.wjw.co.nz -d wjw.co.uk -d *.wjw.co.uk -d wjw.uk -d *.wjw.uk -d walkerfamily.kiwi -d *.walkerfamily.kiwi -d *.nzags.com --dns dns_zonomi 
for mailinabox add "--config-home /home/user-data/ssl" to acme command line and run the following:

    cd /home/user-data/ssl
        rm ssl_certificate.pem 
        ln -s wjw.nz/wjw.nz.cer ssl_certificate.pem
        rm ssl_private_key.pem 
        ln -s wjw.nz/wjw.nz.key ssl_private_key.pem

To fix cert error with curl:
  • wget http://curl.haxx.se/ca/cacert.pem
  • mv cacert.pem /etc/ssl/certs/
  • nano /etc/php/7.0/cli/php.ini 
  • add "curl.cainfo ="/etc/ssl/certs/cacert.pem" under "[curl]"
For mixed DNS hosting

acme.sh --issue --force -d walkerfamily.kiwi --dns dns_gd -d *.walkerfamily.kiwi --dns dns_gd -d wjw.nz -d *.wjw.nz -d wjw.co.nz -d *.wjw.co.nz -d wjw.co.uk -d *.wjw.co.uk -d wjw.uk -d *.wjw.uk -d *.nzags.com --dns dns_zonomi 

September 05, 2019

VMware - Increasing Disk sizes in Linux

http://echenh.blogspot.co.nz/2010/04/how-to-extend-lvm-on-vmware-guest-os.html
http://conrey.org/2011/05/18/lvm-and-vmware-linux-guests-just-do-it/

1. Increase Disk Size
2. Create Partition for used space using cfdisk / Primary Disk
3. pvcreate /dev/sda3
4. vgextend vg_vmlinuxcentos6 /dev/sda3
5. lvextend -l +100%FREE /dev/vg_vmlinuxcentos6/lv_root
6. lvdisplay
7. resize2fs /dev/vg_vmlinuxcentos6/lv_root

April 29, 2019

Creating ASA Cert Package from LetsEncrypt certs on Linux


openssl pkey -des -in /etc/letsencrypt/live/asa.wjw.nz/privkey.pem -pubout /etc/letsencrypt/live/asa.wjw.nz/pubkey.pem

openssl base64 -in /etc/letsencrypt/live/asa.wjw.nz/cert.pem > cert.base64
openssl base64 -in /etc/letsencrypt/live/asa.wjw.nz/privkey-enc.pem > cert.base64
openssl pkcs12 -export -out /etc/letsencrypt/live/asa.wjw.nz/certificate.pfx -inkey /etc/letsencrypt/live/asa.wjw.nz/privkey.pem -in /etc/letsencrypt/live/asa.wjw.nz/cert.pem -certfile /etc/letsencrypt/live/asa.wjw.nz/fullchain.pem

cp /etc/letsencrypt/live/asa.wjw.nz/certificate.pfx /media/nas-backup