Soluzioni

Verifica porta/servizio su Linux

Comandi da eseguire sul Server:

netstat -apnt | grep 5060

ss -aln

lsof -i:5060

Comando da eseguire sul Client per verificare lo stato della porta:

sudo nmap -v -sV 192.168.1.83 -p 5060

Test comunicazione:

1- Stop del Servizio sul Server per liberare la porta: systemctl stop asterisk

2- netcat -v -u -l 5060 (In questo caso -u UDP)

3- sul Client netcat -v -u 192.168.1.83 5060 (In questo caso -u UDP), se non riesce a connettersi provare a stoppare il firewall temporaneamente sul Server: systemctl stop firewalld

Standard
Soluzioni

VirtualBox non si installa su Fedora 33

Al momento per Fedora 33 non è presente l’RPM di VBox e se si prova a installare restituisce l’errore:

error:
Problem: conflicting requestsnothing provides python(abi) = 3.8 needed by VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64
(try to add ‘–skip-broken’ to skip uninstallable packages)

Installare rpmrebuild per modificare il .rpm da python(abi) = 3.8 a python(abi) >= 3.8

rpmrebuild –change-spec-preamble=’sed -e “s/6.1.16_140961_fedora32/6.1.16_140961_fedora33/”‘ –change-spec-requires=’sed -e “s/python(abi) = 3.8/python(abi) >= 3.8/”‘ –package VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64.rpm

Installare le dipendenze:
sudo dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms qt5-qtx11extras libxkbcommon

Rimuovere eventuali configurazioni:
sudo rm -Rf ~/.config/VirtualBox

Installare l’RPM modificato:
sudo dnf install ~/rpmbuild/RPMS/x86_64/VirtualBox-6.1-6.1.16_140961_fedora33-1.x86_64.rpm

Fatto!!!

Standard
Soluzioni

Password sicura

Requisiti essenziali:

  • 12 caratteri dovrebbero essere il minimo, è meglio più di 20 caratteri.
  • Non utilizzare parole comuni.
  • Utilizzare caratteri numerici.
  • Inserire almeno un carattere speciale o simbolo.

Generare passphrase crittograficamente complesse: https://www.rempe.us/diceware/#eff

Verificare la complessità della nostra password: https://www.security.org/how-secure-is-my-password/

Utilizzare dove possibile l’autenticazione a due fattori: https://twofactorauth.org/


Standard
Soluzioni

Come installare GNOME GUI

Per impostazione predefinita, NethServer non installa nessuna GUI, ma essendo una versione derivata da CentOS è possibile installare quella che più preferiamo.
In questo semplice esempio installeremo il desktop GNOME.

  • Partiamo con installare i pacchetti necessari tramite yum:
    yum groupinstall “GNOME Desktop” -y (Ovviamente dobbiamo eseguire come utente root).
  • Impostiamo l’avvio automatico della GUI:
    systemctl set-default graphical.target
    systemctl get-default
  • Cambiamo il target così da avviare subito la GUI:
    systemctl isolate graphical.target, o in alternativa riavviamo il SO.

Bene non ci resta che goderci la nostra GUI preferita 😉

Standard
Soluzioni

yum upgrade – errore

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

It’s possible that the above module doesn’t match the
current version of Python, which is:
2.7.9 (default, Jan 13 2016, 10:34:33)

whereis python
python: /usr/bin/python2.4 /usr/bin/python2.7

ls -l /usr/lib/python

/usr/bin/python -> python2

ln -s /usr/bin/python2.4 /usr/bin/python

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.ori

vi /etc/yum.repos.d/CentOS-Base.repo

Paste: # CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever – Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://vault.centos.org/5.11/os/x86_64/
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever – Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://vault.centos.org/5.11/updates/x86_64/
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://vault.centos.org/5.11/extras/x86_64/
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Download file repo

yum upgrade

Standard
Soluzioni

NAS WD My book live: “Forbidden access”

In locale il My book live non da problemi, ma se lo voglio raggiungere da un altra rete che si trova fuori dalla mia, cercando di aprire la pagina web di configurazione restituisce: Forbidden access.

File incriminato: /etc/apache2/site-available/wdnas

Alla linea 50 trovo:
#comment this line if remote WebUI access is needed (WAN access)
Include /tmp/allow.conf

Sui modelli My Cloud eseguire:

sed -ri ‘s/(\${LOCAL_NET})$/\1 192.168.2.0\/24/’ /etc/apache2/sites-available/wdnas-ui.conf>/dev/null 2>&1;

service apache2 restart

Standard