
@wardmundy @Tonyclewis Works great. Loaded it on my test systems without issue. One bit of weirdness with the login screen:
View attachment 5459
apt-get install knockd -y
sed -i 's|START_KNOCKD=0|START_KNOCKD=1|' /etc/default/knockd
test=`ifconfig | grep eth0`
if [ -z "$test" ]; then
test2=`ifconfig | grep wlan0`
if [ -z "$test2" ]; then
devport=`ifconfig | head -n 1 | cut -f 1 -d ":"`
echo "KNOCKD_OPTS=\"-i $devport\"" >> /etc/default/knockd
else
echo 'KNOCKD_OPTS="-i wlan0"' >> /etc/default/knockd
fi
fi
echo "[options]" > /etc/knockd.conf
echo " logfile = /var/log/knockd.log" >> /etc/knockd.conf
echo "" >> /etc/knockd.conf
echo "[opencloseALL]" >> /etc/knockd.conf
echo " sequence = 7:udp,8:udp,9:udp" >> /etc/knockd.conf
echo " seq_timeout = 15" >> /etc/knockd.conf
echo " tcpflags = syn" >> /etc/knockd.conf
echo " start_command = /usr/sbin/iptables -I INPUT -s %IP% -j ACCEPT" >> /etc/knockd.conf
echo " cmd_timeout = 3600" >> /etc/knockd.conf
echo " stop_command = /usr/sbin/iptables -D INPUT -s %IP% -j ACCEPT" >> /etc/knockd.conf
chmod 640 /etc/knockd.conf
# randomize ports here
lowest=6001
highest=9950
knock1=$[ ( $RANDOM % ( $[ $highest - $lowest ] + 1 ) ) + $lowest ]
knock2=$[ ( $RANDOM % ( $[ $highest - $lowest ] + 1 ) ) + $lowest ]
knock3=$[ ( $RANDOM % ( $[ $highest - $lowest ] + 1 ) ) + $lowest ]
sed -i 's|7:udp|'$knock1':tcp|' /etc/knockd.conf
sed -i 's|8:udp|'$knock2':tcp|' /etc/knockd.conf
sed -i 's|9:udp|'$knock3':tcp|' /etc/knockd.conf
systemctl restart knockd
systemctl enable knockd
echo " "
echo "Knock ports for access to $publicip set to TCP: $knock1 $knock2 $knock3" > /root/knock.FAQ
echo "UPnP activation attempted for UDP 5060 and your knock ports above." >> /root/knock.FAQ
echo "To enable knockd on your server, issue the following commands:" >> /root/knock.FAQ
echo " chkconfig --level 2345 knockd on" >> /root/knock.FAQ
echo " service knockd start" >> /root/knock.FAQ
echo "To enable remote access, issue these commands after yum -y install nmap:" >> /root/knock.FAQ
echo "nmap -p $knock1 --max-retries 0 $publicip && nmap -p $knock2 --max-retries 0 $publicip && nmap -p $knock3 --max-retries 0 $publicip" >> /root/knock.FAQ
echo "Or install iOS PortKnock or Android DroidKnocker on remote device." >> /root/knock.FAQ
I deliberately left out PortKnocker until a more final version with bells and whistles is ready to go. It does not seem like it is widely used. Work on the auto-update for IncrediblePBX is needed and a new FreePBX backup image in a fixed location to install the base extensions and trunks. I don't think a complete incrediblebackup/restore is needed like in the 2027 version if necessary bits and pieces can be downloaded as it is installed.Code to install PortKnocker is apparently missing from the current installer:
Asteridex and Phonebook are gone in FreePBX-17 but the spam blocker can be modified to use the allowlist module for the whitelist.
Download the allowlist module. It serves as phonebook and you can use it for superfecta lookups as well.What if anything provides this functionality if these tool tools are no longer there? I use Phone Book for Caller Id.

cd /
wget https://filedn.com/lBgbGypMOdDm8PWOoOiBR7j/Debian12/asteridex17.tar.gz -O asteridex17.tar.gz
tar zxvf asteridex17.tar.gz
rm -f asteridex17.tar.gz
cd /var/www/html/asteridex17/mysql
./loadmysql.sh
cd /root
fwconsole ma install asteridex
./sig-fix
./sig-fix
Whomever you have making the module mods for PHP 8.2, maybe you can get phonebook updated too. I tried but I believe there is a change in the FreePBX files in /var/www/html/admin/ that prevent what I was doing from working. I don't have sufficient knowledge of the internal plumbing of FreePBX to figure it out.You really don't need the Phonebook module to take advantage of its functionality. Take a look at this old Nerd Vittles article which used the same Asterisk database. Give me a few days to tweak it a bit.
Ha ha. Whomever be me, and decoding FreePBX spaghetti code is above my pay grade. But the sub-log-caller context would let you collect and manipulate CallerIDs in any way desired, and I thought that was your concern. All the data gets stored in AsteriskDB just like what the Phonebook module does. So, if they ever fix it, all of your data should be populated just as if Phonebook never disappeared.Whomever you have making the module mods for PHP 8.2, maybe you can get phonebook updated too. I tried but I believe there is a change in the FreePBX files in /var/www/html/admin/ that prevent what I was doing from working. I don't have sufficient knowledge of the internal plumbing of FreePBX to figure it out.
I already converted my version of that to use the allowlist module which is stored in the asteriskdb. It works well. Lorne had suggested doing that as there are no plans to convert the phonebook module on the FreePBX side. It's pretty easy to export the phone book and bulk import it into the allowlist database.But the sub-log-caller context would let you collect and manipulate CallerIDs in any way desired,
The only value of the phonebook module was the ability to easily add or delete whitelist entries. The allowlist module also allows for that. CID Superfecta will also be modified (per Lorne Gaetz PR) to use the allowlist as a CID lookup source.You really don't need the Phonebook module to take advantage of its functionality. Take a look at this old Nerd Vittles article which used the same Asterisk database. Give me a few days to tweak it a bit.
Allowlist uses the asteriskdb. The contact manager stuff is the nightmare. Install the module on one of your systems and take a look.@kenn10: Are you saying you modified the AllowList code to use the AsteriskDB??By default, it uses MySQL convoluted tables. If so, I'd love to see what you've done. Thanks.

joecloud4*CLI> database show allowlist
/allowlist/2153830190 : BCBSNC FAX
/allowlist/2677150890 : Schlesingergroup
/allowlist/3052532244 : ASSURANT
Link up your team and customers Phone System
Live Chat
Video Conferencing
Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.
Check your inbox!
We’ve sent you an email. Click on the button in the email body to verify your email address – (if you can not find it, check your spam folder).
Upon verification you will be directed to the 3CX setup wizard.