Posts

Showing posts from 2019

How to check if NTP client works on windows 7/10

How to check if NTP client works on windows 7/10 run this command from command line: w32tm /stripchart /computer:jp.pool.ntp.org /dataonly /samples:5 Response will be : C:\Windows\System32>w32tm /stripchart /computer:jp.pool.ntp.org /dataonly /samples:5 Tracking jp.pool.ntp.org [162.159.200.1:123]. Collecting 5 samples. The current time is 24.10.2019 08:58:22. 08:58:22, -00.3017199s 08:58:24, -00.3021865s 08:58:26, -00.3018570s 08:58:28, -00.3018344s 08:58:30, -00.3017718s

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks   1. Install fail2ban  sudo apt-get update ; sudo apt-get install fail2ban 2. create jail file vi /etc/fail2ban/jail.d/pihole-dns.conf [pihole-dns] enabled = true port     = 53 action   = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]            %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp] logpath = /var/log/pihole.log findtime = 60 maxretry = 5 bantime = 3600   3. create filter file vi /etc/fail2ban/filter.d/pihole-dns.conf # Fail2Ban configuration file # # script from www.marek.tokyo # [INCLUDES] # Read common prefixes. If any customizations available -- read them from # common.local before = common.conf [Definition] _daemon = dnsmasq # log example from /var/log/pihole.