search

Sunday, March 22, 2020

Run command on suspend

Create a file located in /usr/lib/systemd/system-sleep directory:
#!/bin/sh
if [ "${1}" == "pre" ]; then
  nordvpn d
elif [ "${1}" == "post" ]; then
  echo "Hello"
fi

Tuesday, March 3, 2020

Debug route table

List all routes in system:
route -n
Get route for a specific IP:
ip route get 1.1.1.1

Log denied connections in firewalld

Edit filr /etc/sysconfig/firewalld:
FIREWALLD_ARGS=--debug=10