Chrony Clients to the GPS Clocks

apt-get install chrony

systemctl enable chrony
systemctl start chrony
systemctl status chrony

/etc/chrony/chrony.conf
# Source servers
server gps1.my.side iburst
server gps2.my.side iburst
pool pool.ntp.org maxsources 3

# Act as an NTP server
#allow

# Only allow chronyc from the localhost
cmdallow 127.0.0.1

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Notify on error correction > 0.5 seconds
logchange 0.5

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Lock clock in to RAM
lock_all

# RTS
sched_priority 1

# Fudge Stratum if we cannot reach the internet
local stratum 10

# Save on exit
dumponexit
dumpdir /var/log/chrony

# Require 2 time sources before adjusting clock
minsources 2

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC
leapsecmode slew
maxslewrate 1000
smoothtime 400 0.001 leaponly

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
log measurements statistics tracking

systemctl restart chrony

netstat -ant

watch “chronyc sources -v”

Hits: 10

Chrony+GPSD (PPS+GPS) on Pi

apt-get update; apt-get -y dist-upgrade; apt -y autoremove; apt clean; apt autoclean

root@gps1:~# cat /etc/apt/sources.list
deb http://approx.my.side/raspbian/ bullseye main contrib non-free rpi

apt clean; apt update; apt upgrade; apt dist-upgrade; apt autoremove

reboot

apt-get install snmpd
apt-get install lsof
Configure remote logging

ln -s /usr/share/zoneinfo/US/Central /etc/localtime

Set swap to 1G
vi /etc/dphys-swapfile
CONF_SWAPSIZE=1024
/etc/init.d/dphys-swapfile stop
/etc/init.d/dphys-swapfile start

/boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=1d8091da-02 rootfstype=ext4 elevator=deadline fsck.repair=yes net.ifnames=0 rootwait

/boot/config.txt

#GPS Changes
enable_uart=1
init_uart_baud=57600
disable_pvt=1
dtoverlay=pps-gpio,gpiopin=21
dtoverlay=pi3-disable-bt

echo “pps-gpio” >> /etc/modules

apt-get install pps-tools

reboot

lsmod
vcgencmd measure_clock arm

apt-get install gpsd gpsd-clients

/etc/default/gpsd

DEVICES="/dev/gps0"
GPSD_OPTIONS="-n"
USBAUTO="false"


root@gps1:/etc/udev/rules.d# cat 09.gps.rules
KERNEL=="ttyAMA0", SYMLINK+="gps0"
KERNEL=="pps0", OWNER="root", GROUP="tty", MODE="0777", SYMLINK+="gpspps0"

systemctl enable gpsd

reboot

systemctl status gpsd
gpsmon /dev/gps0

ppstest /dev/pps0

reboot

systemctl disable systemd-resolved
systemctl stop systemd-resolved
systemctl status
systemctl disable dhcpcd.service
Configure /etc/network/interfaces

reboot (hope for the best)

apt-get install chrony

/etc/chrony/chrony.conf

# Source Clock
refclock PPS /dev/pps0 lock NMEA refid PPS1 prefer
refclock SHM 0 offset 0.5 refid NMEA noselect

# Internal peers
peer gps2.my.side iburst prefer

# Sanity Servers
server time1.google.com iburst
server time2.google.com iburst
server time3.google.com
server time4.google.com

# Act as an NTP server
allow XXX.XXX.XXX.XXX/XX

# Only allow chronyc from the localhost
cmdallow 127.0.0.1

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Notify on error correction > 0.5 seconds
logchange 0.5

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Lock clock in to RAM
lock_all

# RTS
sched_priority 1

# Fudge Stratum if we cannot reach the internet
local stratum 10

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC
leapsecmode slew
maxslewrate 1000
smoothtime 400 0.001 leaponly

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
log measurements statistics tracking

keyfile /etc/chrony/chrony.keys

systemctl enable chrony
systemctl status chrony
systemctl restart chrony
systemctl status chrony

watch “chronyc sources -v”

General OS Setup:
apt-get install libsasl2-modules postfix bsd-mailx deborphan
Create /root/.forward
/etc/postfix/main.cf: inet_interfaces = loopback-only

apt-get install bind9 dnsutils
named.conf.local

Fail2Ban
Install custom /etc/fail2ban/jail.local

apt-get install clamav
/etc/clamav/freshclam.conf
#NotifyClamd /etc/clamav/clamd.conf

Hits: 11

Teamspeak Linux Setup

  1. Download proper Teamspeak server for your architecture.
  2. Create teamspeak user.
  3. tar -xvf *.tar.bz2
  4. vi /etc/systemd/system/teamspeak.service

[Unit]
Description=TeamSpeak 3 Server
After=network.target

[Service]
WorkingDirectory=/home/teamspeak/ts3s/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/home/teamspeak/ts3s/ts3server_startscript.sh start inifile=ts3server.ini
ExecStop=/home/teamspeak/ts3s/ts3server_startscript.sh stop
PIDFile=/home/teamspeak/ts3s/ts3server.pid
RestartSec=15
Restart=always

[Install]
WantedBy=multi-user.target

5. systemctl start teamspeak

6. cat /usr/local/teamspeak/logs/* | grep “token”

7. Login to Teamspeak using client and enter token to take ownership.

Hits: 115

5Ghz WiFi and Windows 10

I have been having issues with devices maintaining connections to my 5Ghz SSID on multiple devices. After the latest Android update, it seems my phone is able to maintain reliable 5Ghz connections but my Windows 10 laptop was still having issues. After some searching I decided to update the driver and see if it made a difference. Its still too early tell for sure, but it seems the new driver is doing better. The AP in question is a Synology RT2600ac with SmartConnect disabled, running 2 separate SSIDs for 2.4Ghz and 5Ghz. Support has been of absolutely no use. They repeatedly stated they didn’t see any disconnects in the logfile dumps.

Normally I would only stay connected, if I could connect at all, for a few minutes.

System Manufacturer:LENOVO
System Product Name:20L50017US
BIOS Date:05/22/2018
BIOS Version:N24ET39W (1.14 )
OS Build:17763.1.amd64fre.rs5_release.180914-1434

The driver version I was having an issue with:
Device: Intel(R) Dual Band Wireless-AC 8265
Current driver version: 20.70.11.3
Driver date: 6-29-2019

The latest version in testing:
Device: Intel(R) Dual Band Wireless-AC 8265
Current driver version: 20.70.12.5
Driver date: 8-26-2019

I ran “netsh wlan show wlanreport” to get some insight on what was going on.
BOLD items below are 5Ghz specific errors and warnings. The 2.4Ghz SSID has been working without issue.

Session Success/Failures
Status Count
Successes 2
Failures 10
Warnings 16

Disconnect Reasons
Reason Count
The driver disconnected while associating. 8
The network is disconnected by the driver. 7
The network is disconnected because the user wants to establish a new connection. 4
The network is disconnected by the user. 2

The error I was repeatedly getting while trying to connect to the 5Ghz SSID is:
Failure Reason:The driver disconnected while associating.

The red Xs in the image below are all dropped connections to 5Ghz.

Hits: 349