User Tools

Site Tools


computing:chatmail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:chatmail [2026/09/09 04:05] – oemb1905computing:chatmail [2026/09/23 23:16] (current) – oemb1905
Line 101: Line 101:
   ufw allow 587/tcp   ufw allow 587/tcp
   ufw allow 993/tcp   ufw allow 993/tcp
-  ufw allow 3340/tcp+  #ufw allow 3340/tcp #used by nginx and IROH, if one box only, keep closed
   ufw allow 8443/tcp   ufw allow 8443/tcp
-  ufw allow 3478/tcp+  ufw allow 3478/tcp #used by stock turn, but kept open in case chatmail-turn library uses it
   ufw allow 3478/udp   ufw allow 3478/udp
 +  ufw allow 7842/udp
 +  ufw allow 49152:65535/udp #recommended for turn rfc 6335/8656, needs custom rule, see below
   ufw enable   ufw enable
  
- --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/09/09 04:04//+By default, ''chatmail-turn'' will take any free udp port that the kernel offers it. On Debian systems, this ephemeral range default can be queried with ''cat /proc/sys/net/ipv4/ip_local_port_range'' and, at least on my systems is ''32768-60999''. This range is apparently the default on many Linux kernels, however, [[https://www.rfc-editor.org/rfc/rfc8656.html|RFC8656]] and [[https://www.rfc-editor.org/rfc/rfc6335.html|RFC6335]] suggest ''49152-65535''. For this reason, and since these are dedicated chatmail boxes, I figured it was wiser to tightly restrict ephemeral port usage to this recommended range only. I did that with ''sysctl'' by opening ''sudo nano /etc/sysctl.d/99-ephemeral-rfc6335.conf'' and entering: 
 + 
 +  net.ipv4.ip_local_port_range = 49152 65535 
 + 
 +Then, either reboot the server or run ''sysctl --system'' and then confirm the rule stuck with ''cat /proc/sys/net/ipv4/ip_local_port_range'' and you should see ''49152 65535'' as the output. Once this was done, I made a simple script to see RAM use, storage use, and track total users: 
 + 
 +<code> 
 +cat << 'EOF' > /usr/local/bin/chatmail-report.sh 
 +#!/bin/bash 
 +DATE=$(date +"%Y%m%d-%H:%M:%S") 
 +LOG="/home/logs/chatmail-report.log" 
 +echo "Jonathan, at $(date), your vitals for $(hostname -f) were as follows:" > $LOG 
 +echo "" >> $LOG 
 +echo "Here's the df and ram report ..." >> $LOG 
 +df -h >> $LOG 
 +free -h >> $LOG 
 +echo "" >> $LOG 
 +echo "Here are the mail directories for mail.haacknet.org ..." >> $LOG 
 +echo "Total users: $(find /home/vmail/mail/mail.haacknet.org -mindepth 1 -maxdepth 1 -type d | wc -l)" >> $LOG 
 +find /home/vmail/mail/mail.haacknet.org -mindepth 1 -maxdepth 1 -type d >> $LOG 
 +echo "" >> $LOG 
 +printf "To: email@haacksnetworking.org\nSubject: [%s]-chatmail-report-%s\n\n" "mail.haacknet.org" "$(date)" | cat - "$LOG" | sendmail -t 
 +rm -f /tmp/chatmail-report.lock 
 +EOF 
 +chmod 750 /usr/local/bin/chatmail-report.sh 
 +</code> 
 + 
 + --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/09/23 23:16//
computing/chatmail.1788926715.txt.gz · Last modified: by oemb1905