Dienstag, 28. April 2020

Secure erase of Harddisks

In case you have to do a secure erase of a Harddisk (not SSD!)


shred -vfz -n 8 /dev/sda

Donnerstag, 16. April 2020

Jitsi Meeting Installation

In case you want to install Jitsi Meeting

apt update && apt upgrade -V && apt dist-upgrade && apt autoremove
reboot


sudo ufw allow OpenSSH
sudo ufw allow http
sudo ufw allow https
sudo ufw allow in 10000:20000/udp 
sudo ufw enable

sudo apt install -y openjdk-8-jre-headless

sudo apt install -y nginx
sudo systemctl start nginx.service 
sudo systemctl enable nginx.service

wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
sudo sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list" 
sudo apt update -y

sudo apt install -y jitsi-meet

Absichern:

Shell

vi  /etc/prosody/conf.avail/meet.meinedomain.de.cfg.lua
Hier werden sog. virtuelle Hosts definiert (nicht zu verwechseln mit den virtuellen Hosts von nginx). Der erste virtuelle Host wird nun so eingestellt, dass eine Authentifizierung erforderlich ist:

VirtualHost "meet.meinedomain.de"
    authentication = "internal_plain"
Am Ende der Datei wird dann ein weiterer virtueller Host hinzugefügt:

VirtualHost "guest.meet.meinedomain.de"
    authentication = "anonymous"
    c2s_require_encryption = false

Als nächstes wird der neue virtuelle Host der Jitsi Meet Installation bekannt gemacht:

vi  /etc/jitsi/meet/meet.meinedomain.de-config.js
Unter der Angabe der eigentlichen Domain wird nun die Domain des zuvor angelegten virtuellen Hosts als „anonyme Domain“ hinterlegt:

hosts: {
        // XMPP domain.
        domain: 'meet.meinedomain.de',

        // When using authentication, domain for guest users.
        anonymousdomain: 'guest.meet.meinedomain.de',
Nun muss noch eine weitere Datei bearbeitet werden:

vi /etc/jitsi/jicofo/sip-communicator.properties
Hier fügen wir einfach nur eine Zeile ein:

org.jitsi.jicofo.auth.URL=XMPP:meet.meinedomain.de

Nun folgt noch ein wichtiger Punkt: Das Hinzufügen von Benutzername und Passwort zum Erstellen neuer Konferenz-Räume. Dazu einfach folgenden Befehl direkt in die Kommandozeile eingeben:


prosodyctl register JitsiAdmin meet.meinedomain.de 'mEinPAssw0rt'

danach neu Starten:

service prosody restart
service jicofo restart
service jitsi-videobridge2 restart

If the installation is on a machine behind NAT jitsi-videobridge should configure itself automatically on boot. If three way call does not work further configuration of jitsi-videobridge is needed in order for it to be accessible from outside. Provided that all required ports are routed (forwarded) to the machine that it runs on. By default these ports are (TCP/443 or TCP/4443 and UDP/10000). The following extra lines need to be added to the file /etc/jitsi/videobridge/sip-communicator.properties:

org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=<Local.IP.Address>
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=<Public.IP.Address>
Jitsi crash when a second participant join the conference?On /var/log/jitsi/jicofo.log, a line similar to the following is found:
SEVERE: org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Can not invite participant — no bridge available

To fix the video bridge, the same password (In my example: PASSWord) need to be set on 2 places:

# cat /etc/jitsi/videobridge/config | grep JVB_SECRET
JVB_SECRET=PASSWORD

# cat /etc/jitsi/videobridge/sip-communicator.properties | grep org.jitsi.videobridge.xmpp.user.shard.PASSWORD=
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=PASSWORD

than:

# prosodyctl passwd jvb@auth.your.domain.com
Enter PASSWORD twice here

followed by reboot of your jitsi server

Ubuntu 18 Netplan

In case you have problems with static IP on ubuntu:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
network:
version: 2
  renderer: networkd
  ethernets:
    enp0s25:
      dhcp4: yes
      dhcp6: no
      gateway4: 172.168.0.1
      nameservers:
          addresses: [172.168.0.1]
  wifis:
    wlp3s0:
     dhcp4: yes
     dhcp6: no
     gateway4: 172.168.0.1
     nameservers:
          addresses: [172.168.0.1]
     access-points:
        "myssid":
          password: "mypassword"

Or make an online check: 

don't forget: netplan apply


Dienstag, 14. April 2020

Grandstream HandyTone 802 (HT802) Fax ATA

In case you have problems to send a fax via VoIP

try this
Tab: FXS PORT
  • Use First Matching Vocoder in 200OK SDP to YES
  • Preferred Vocoder: choice 1: PCMU
  • Fax Mode to Passthrough
  • Re-INVITE After Fax Tone Detected to “Enabled”
  • Disable Line Echo Canceller (LEC) to YES
  • Jitter Buffer Type to Fixed (if that causes issues you can set it to Adaptive)
  • Disable Call-Waiting: set to YES
  • isable Call-Waiting Caller ID: set to YES
  • Disable Call-Waiting Tone: set to YES

MYSQL MD5 Passwort reset in database

In case you have to alter a MD5 password in a mySQL table


  1. Create the MD5 hash of your password
  2. Create a file called password.txt, containing nothing but the new password
  3. Having a MACmd5 -q ./password.txt; rm ./password.txt 
  4. Login your database 
  5. mysql -u root -p
  6. show databases;
  7. use (name-of-database, i.e. mailer);
  8. show tables; 
  9. select * from users; (to see what is in your DB)
  10. UPDATE users SET password=”(MD5-string-you-made)” WHERE ID = (id#-of-account-you-are-reseting-password-for);
  11. “SELECT ID, user_login, user_pass FROM (name-of-table-you-found);” (to confirm your changes)