TIPS Knockd on PogoMobile?

tycho

Guru (not...)
Joined
Aug 9, 2011
Messages
652
Reaction score
272
I've been very happy with how knockd works on my Cloud@Cost Asterisk 12/FreePBX12/Ubuntu 14 instance (installed per http://nerdvittles.com/?p=11041). So happy that I thought I might try to install it on my PogoMobile (installed per http://nerdvittles.com/?p=10560).

No go, as least as I am attempting it.

The NV article offers installation approaches for "RedHat/Fedora/CentOS/ScientificLinux servers", for "Ubuntu/Debian servers", and for "ARM-based servers". I wasn't sure which of the second two to pick. Yes, my PogoMobile is ARM-based, but it runs Debian, and I thought maybe when you stated "ARM-based servers" you might be talking about the OS (i.e, perhaps ArchLinux or similar). So, I tried the Debian script. No workie:

Code:
dpkg: error processing knockd_0.5-3_amd64.deb (--install):
package architecture (amd64) does not match system (armel)
Errors were encountered while processing:
knockd_0.5-3_amd64.deb
sed: can't read /etc/default/knockd: No such file or directory
./knock-U.sh: line 103: /etc/init.d/knockd: No such file or directory

OK, that made sense, but I hope I hadn't broken anything on my otherwise fine-working system (did I?) But, even given the above error message, the installation wraps up saying this:

Code:
Install Complete. knockd has been enabled as requested.
Knock ports for access to XXX.XXX.XXX.XXX set to TCP: XXXX XXXX XXXX
To enable remote access, issue these commands from any remote server:
nmap -p ___ && nmap -p ___ && nmap -p ___
Install iOS PortKnock or Android PortKnocker on smartphone. Read knock.FAQ.

That's a big fib, of course, because knockd had NOT been enabled. It wasn't even installed.

I then decided to turn to the "Arm-based system" script. After a few go-rounds I read through the script and noted the things that, if pre-existing, would stop the script from completing (knockd.conf, IIRC at this time). I deleted those remainders from the prior botched install and the script completed. But:

Code:
dpkg: error processing knockd_0.5-3ubuntu1_armhf.deb (--install):
package architecture (armhf) does not match system (armel)
Errors were encountered while processing:
knockd_0.5-3ubuntu1_armhf.deb
sed: can't read /etc/default/knockd: No such file or directory
./knock-ARM.sh: line 101: /etc/init.d/knockd: No such file or directory

(Once again, the install finished up claiming "Install Complete. knockd has been enabled as requested." Fibber McGhee).

So: I have an "armel" system, inconsistent from the required "armhf" system. I looked about for a (plain?) "armel" version of knockd and may have found one but I'm uncertain if this will fly. Perhaps I can re-write ths script to include a package from the following instead of the offending armhf package:

https://packages.debian.org/wheezy/armel/knockd/filelist

Or, does the knockd ship then just pass me by?
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
865
Reaction score
144
Have you tried...

Code:
apt-cache search knockd

... to see if it's already in the repository for your distro?
 

tycho

Guru (not...)
Joined
Aug 9, 2011
Messages
652
Reaction score
272
I hadn't tried that and did based on your suggestion. It is out there for armel.

I got it working by taking the Ubuntu script (from http://nerdvittles.com/?p=9871) and making changes so as to point to the correct .deb for armel rather than armhf. I used this:

wget http://ftp.us.debian.org/debian/pool/main/k/knockd/knockd_0.5-3_armel.deb

I also deleted the portions of the script relating to 64 bit stuff, and frankly anything other than this particular kind of machine.

There was also a dependency issue. "knockd" depends on "logrotate" which had not previously been installed. I seem to recall reading that being intentional so as to avoid wear and tear on the SD card. Nevertheless, I did 'apt-get -f install' to resolve the dependency issue, and knockd installed.

I'll make a backup to re-image a new SD card down the road if this one starts to throw errors due to too-much log writing. This SD was free and I can afford another one for $6 when the time comes...
 

Members online

Forum statistics

Threads
25,812
Messages
167,767
Members
19,241
Latest member
bellabos
Get 3CX - Absolutely Free!

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.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top