fortinet troubleshoot

diag debug flow filter add 10.212.134.200
diag debug flow show console enable
diag debug flow show function-name enable
diag debug flow trace start 10000
diag debug enable

diag debug reset
diag debug flow filter clear
diag debug flow show function console disable
diag debug flow show function-name disable

Opencart memo

To fix country loading error under fastor theme 1.4, under catalog/view/theme/fastor/template/account change register.tpl last part “account/account/country&country_id=” to “localisation/country&country_id=”.

To enable opencart mail service, need to install ssmtp on server first, otherwise port 465 and smtp module won’t work.

import .pem cert into windows

certutil –addstore –f “Root” *path*

generate haproxy cert/key file.

openssl req -x509 -newkey rsa:4096 -keyout cert.crt -out cert.crt -days 365 -nodes

haproxy redirect http to https

docker run -d -e FORCE_SSL=yes -e CERT_FOLDER='/cert/' --name webapp dockercloud/hello-world
docker run -d --link webapp:webapp -p 443:443 dockercloud/haproxy

Ubuntu APT

apt dist-upgrade will upgrade and remove packages, while apt upgrade will only upgrade.

apt purge will remove any installed file including config, while apt remove will only remove installed package.

lsb_release -a can check current ubuntu version

apt-cache policy “package” can check available package version and source:

sudo apt-cache policy python-django

python-django:
Installed: (none)
Candidate: 1.7.6-1ubuntu2.3~cloud0
Version table:
1.7.6-1ubuntu2.3~cloud0 0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/kilo/main amd64 Packages
1.6.11-0ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
1.6.1-2ubuntu0.16 0
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
1.6.1-2 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

to change priority to use 1.6.11 as candidate, need to create file under /etc/apt/preferences.d with name like pin-600:

Package: python-django
Pin: origin us.archive.ubuntu.com
Pin-Priority: 600

than when policy looks at the list, it will see 1.6.11 has higher priority and use it as candidate to install.
python-django:
Installed: (none)
Candidate: 1.6.11-0ubuntu1
Package pin: 1.6.11-0ubuntu1
Version table:
1.7.6-1ubuntu2.3~cloud0 600
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/kilo/main amd64 Packages
1.6.11-0ubuntu1 600
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
1.6.1-2ubuntu0.16 600
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
1.6.1-2 600
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages