Visualizzazione post con etichetta Debian. Mostra tutti i post
Visualizzazione post con etichetta Debian. Mostra tutti i post

12 gennaio 2024

Pivpn su sistemi debian/ubuntu based non supportati - PiVPN for unsupported Debian/ubuntu derivatives



 PiVPN è un ottimo sistema per realizzare velocemente un server vpn domestico.

E a che serve?

Beh, fondamentalmente a collegarsi da remoto al pc di casa vostra.

Realizzare una vpn è una faccenda relativamente complessa e richiede un minimo di competenza anche usando PiVpn che è un software in grado di automatizzare il 95% delle attività di installazione e configurazione.

Ma quel 5% residuo (procurarsi un DNS dinamico, aprire le porte del router, definire un IP statico per il server ecc.) va fatto a mano. Il wizard di PiVpn è ben fatto ma non fa miracoli.

Tuttavia tra 100 e 5 c'è una bella differenza e un gran risparmio di tempo e fatica.

Personalmente, infatti, ho configurato più volte server VPN partendo da zero ed è un compito, ormai, più noioso che impegnativo e preferisco usare PiVpn e risparmiarmi la noia.

Ma c'è un problema:

PiVPN si installa solo e soltanto su 

Raspbian and Raspberry PI OS bastai su Debian Stretch, Buster e Bullseye. Su Ubuntu Server, DietPi e

Alpine Linux.

E le derivate di Debian/Ubuntu?

Beh, la documentazione dice che potrebbe funzionare ma loro non danno supporto in merito.

Di fatto, l'installer di PiVPN si rifiuta di proseguire se non rileva i sistemi operativi supportati ufficialmente.

E allora come si fa?

Ecco qua il trucchetto:

Per esempio, da Linux Mint è necessario modificare (momentaneamente) il file /etc/os-release come segue: dopo il setup si può rimettere tutto come stava prima. Su Mint 21.1 e LMDE6 poi PiVPN si installa e funziona perfettamente:


#NAME="Linux Mint"

#VERSION="21.2 (Victoria)"

#ID=linuxmint

#ID_LIKE="ubuntu debian"

#PRETTY_NAME="Linux Mint 21.2"

#VERSION_ID="21.2"

NAME="Ubuntu"

VERSION="22.04 (Jammy)"

ID=ubuntu

ID_LIKE="ubuntu debian"

PRETTY_NAME="Ubuntu 22.04"

VERSION_ID="22.04"

HOME_URL="https://www.linuxmint.com/"

SUPPORT_URL="https://forums.linuxmint.com/"

BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"

PRIVACY_POLICY_URL="https://www.linuxmint.com/"

VERSION_CODENAME=victoria

UBUNTU_CODENAME=jammy


oppure, per LMDE


#PRETTY_NAME="LMDE 6 (faye)"

#NAME="LMDE"

#VERSION_ID="6"

#VERSION="6 (faye)"

#VERSION_CODENAME=faye

#ID=linuxmint

#HOME_URL="https://www.linuxmint.com/"

#SUPPORT_URL="https://forums.linuxmint.com/"

#BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"

#PRIVACY_POLICY_URL="https://www.linuxmint.com/"

#ID_LIKE=debian

NAME="Debian"

VERSION="12"

DEBIAN_CODENAME=bookworm

ID=debian


Dopodiché, basta lanciare curl -L https://install.pivpn.io | bash da un terminale root e seguire il wizard. Ed il gioco è fatto: in pochi minuti avrete il vostro server vpn.


In Google Translator's English:


PiVPN is an excellent way to quickly create a home VPN server.

And what's the point?

Well, basically to connect remotely to your home PC.

Creating a VPN is a relatively complex matter and requires a minimum of expertise even using PiVpn which is software capable of automating 95% of installation and configuration activities.

But that remaining 5% (procuring a dynamic DNS, opening the router ports, defining a static IP for the server, etc.) must be done by hand. The PiVpn wizard is well done but doesn't work miracles.

However, between 100 and 5 there is a big difference and a great saving of time and effort.

Personally, in fact, I have configured VPN servers several times starting from scratch and it is now a task that is more boring than challenging and I prefer to use PiVpn and save myself the boredom.

But there's a problem:

PiVPN installs only and only on Raspbian and Raspberry PI OS based on Debian Stretch, Buster and Bullseye. On Ubuntu Server, DietPi and Alpine Linux.

What about Debian/Ubuntu derivatives?

Well, the documentation says it might work but they don't support it.

In fact, the PiVPN installer refuses to continue if it does not detect officially supported operating systems.

So how do you do it?

Here's the trick:

For example, from Linux Mint it is necessary to (temporarily) modify the /etc/os-release file as follows: after setup you can put everything back as it was before. On Mint 21.1 and LMDE6 then PiVPN installs and works perfectly:

#NAME="Linux Mint"

#VERSION="21.2 (Victoria)"

#ID=linuxmint

#ID_LIKE="ubuntu debian"

#PRETTY_NAME="Linux Mint 21.2"

#VERSION_ID="21.2"

NAME="Ubuntu"

VERSION="22.04 (Jammy)"

ID=ubuntu

ID_LIKE="ubuntu debian"

PRETTY_NAME="Ubuntu 22.04"

VERSION_ID="22.04"

HOME_URL="https://www.linuxmint.com/"

SUPPORT_URL="https://forums.linuxmint.com/"

BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"

PRIVACY_POLICY_URL="https://www.linuxmint.com/"

VERSION_CODENAME=victoria

UBUNTU_CODENAME=jammy


and, for LMDE


#PRETTY_NAME="LMDE 6 (faye)"

#NAME="LMDE"

#VERSION_ID="6"

#VERSION="6 (faye)"

#VERSION_CODENAME=faye

#ID=linuxmint

#HOME_URL="https://www.linuxmint.com/"

#SUPPORT_URL="https://forums.linuxmint.com/"

#BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"

#PRIVACY_POLICY_URL="https://www.linuxmint.com/"

#ID_LIKE=debian

NAME="Debian"

VERSION="12"

DEBIAN_CODENAME=bookworm

ID=debian


After that, just run curl -L https://install.pivpn.io | bash from a root terminal and follow the wizard. And that's it: in a few minutes you will have your VPN server.

27 settembre 2015

How to Install the Brother MFC-L2700DW printer/scanner in Debian/Ubuntu/Mint/Fedora


The Brother MFC-L2700DW is a very nice piece of hardware
Is a 26 ppm A4 B/W Laser Multifunction Printer, with automatic duplex, fax and scanner.
USB, LAN and WiFi connections.
Today, you can buy it on Amazon (Italy) at about € 120,00
Here there is the Borther product page.
Drum and toner are separate, an useful bonus in this class of printers.
The 2600 pages TN-2320 Toner Cartridge costs abut € 65,00.

Unfortunately, it is not possible to combine the wireless interface with the wired one, or does one or the other works. Not a big problem, but it could be useful in some scenarios.

The installation is not particularly difficult, but it's all from the command line so may be useful a little step by step procedure.

I am assuming that you have entered the IP address and the correct network parameters via LCD panel of the printer, for this operation the manual included in Documentation CD-ROM is very clear

Brother allows separate download for all the drivers components, but it is more practical to use the script provided which will download the updated deb / rpm and install the software prerequisites and dipendencies.

First, let's download the driver installer tool from the product download page which installs printer and scanner drivers

  1. Unzip the script: gunzip linux-brprinter-installer-2.0.0-1.gz
  2. make it executable: chmod a+x linux-brprinter-installer-2.0.0-1
  3. become root: sudo -s  or su if you use Fedora
  4. launch the script appending the Printer Product Name: bash linux-brprinter-installer-2.0.0-1 MFC-L2700DW
  5. the first output of the command is:
You are going to install following packages.
   mfcl2700dwlpr-3.2.0-1.i386.deb
   mfcl2700dwcupswrapper-3.2.0-1.i386.deb
   brscan4-0.4.3-1.amd64.deb
   brscan-skey-0.2.4-1.amd64.deb
OK? [y/N] ->


Press y and the installation will start. For purists, you must know that some of the drivers are not open source and you'll must  accept proprietary licenses.


The next steps of the installation require the acceptance of licenses and allowing the drivers download until you will be asked:

Will You Specify the Device URI? (Y/n)

to which, for network installations, you must press Y ( and N if you use the USB connection).

You will be offered a wide choice of options: press 9 and enter the IP address of the printer.

The installation will continue for the scanner and you must only accept licenses and downloads if you use Debian and derived, while if you use Fedora you'll have to re-enter the printer's IP.

The install will end soon after and a reboot is not strictly required.

What you can do now:

of course, print. Use Simple Scan Tool for scanning also via ADF.

What you will not be able to do:


  • send faxes from your PC;
  • Scan directly from scanner to PC by pressing using the printer buttons. (But I'm working on it ...)

Related Post for Brother MFC-7360N:

http://invernoerosa.blogspot.it/2012/06/installare-lo-scanner-della-brother-mfc.html

19 ottobre 2011

I and Linux: a Love Story

Dear English readers, I translated the post by Google Translator, you can found it at the bottom...

Ho incontrato Linux per la prima volta alla metà degli anni '90 al LAIB 2 del Politecnico di Torino.
Allora i computers, i286 ed i386, giravano con Dos e Windows 3. 
Quel computer mi attirò subito: era diverso dagli altri.
Purtroppo era anche il computer del responsabile dell'aula ed avvicinarsi era praticamente impossibile.
Un paio di anni dopo, grazie alla meritoria iniziativa "Un Computer in Ogni Casa", mi riuscì di acquistare un pc dotato del mitico processore AMD Thunderbird per affiancare il mio vecchio 486. Una belva di macchina, per l'epoca, quella CPU. Spinta fino alla follia, si bruciava in un secondo in caso di rottura della ventola ( non aveva il diodo di sicurezza ). Ovviamente, il bando della regione imponeva la presenza di un sistema operativo originale. Ed io pensai bene di risparmiare un bel po' di denaro usando linux.
Da escamotage formale, la cosa si trasformò in un evento epocale.
Così, un bel giorno, mi ritrovai in stanzetta con il mio pc nuovo nuovo, un modem 56k esterno su porta com ( ancora perfettamente funzionante ) ed una serie di Floppy Disk contenenti una versione di Mandrake Linux di cui non ricordo il numero.
E fu amore.


Riuscii a configurare al primo colpo anche il modem.
Non fu un amore travolgente, ma una passione dell'anima.
Dopo Mandrake provai Fedora 2, poi 3, poi 4 e con Fedora 5 ricordo di esser riuscito a sostituire per la prima volta completamente Windows su un PC lavorativo.



Da allora non mi sono più fermato.
Attorno alla seconda metà degli anni zero sono passato a Debian ed Ubuntu, ma ho potuto apprezzare anche le distribuzioni specializzate come Ipcop, Endian, FreeNas ( che se non erro è BSD però ) e persino Opensuse, per non parlare di quelle di nicchia come Pardus Linux. Ho usato Gnome, KDE ed altri ambienti grafici a seconda dei miei gusti e delle mie necessità.



A dieci anni di distanza  ho solo il rammarico di non aver seguito completamente questa passione, magari ora le cose sarebbero state diverse.
L'anno scorso, in occasione del quarto Linux Day, sono riuscito a migrare il mio PC fisso a linux. Quest'anno, complici la mia maggiore esperienza e la migliorata qualità del software, sono riuscito a migrare tutti i miei sistemi ( aspetti ludici a parte ) a Linux, compreso il portatile HP che avevo recentemente formattato con windows.
E' stato un lungo cammino che analizzo per la prima volta in questi termini.
Linux mi ha dato tante opportunità professionali.




Mi ha consentito di ripristinare reti infette da virus con un piccolo netbook da duecento €.
Mi ha consentito di lavorare in condizioni in cui le macchine windows smettono di funzionare, di recuperare dati, di lavorare dalle tendopoli, di portare il web a persone che non avrebbero potuto permettersi l'acquisto di un nuovo pc figuriamoci le licenze di windows. Mi ha consentito di non essere più stressato da richieste di supporto tecnico continuo da parte di amici e parenti che ho fatto migrare da windows a linux. Mi ha consentito di essere padrone della mia vita digitale in libertà e consapevolezza: quando qualcosa va storto, in genere, io so cosa va storto, con Linux. E non dipendo più dai capricci delle multinazionali del settore.
Oggi, posso scegliere.
Ma l'evoluzione tecnica di questa storia è nulla se confrontata al contributo umano che Linux ha portato alla mia vita.
Non solo attraverso le persone incontrate online da cui ho prima imparato e a cui ho, dopo, prestato soccorso.




Ricordo ancora la chiacchierata in Bottega che ha portato a queste cinque splendide esperienze che sono state i Linux Day materani. "Ah, tu dici ai ragazzi che usare Linux è il modo scout di usare il computer?" E ricordo i volti, le voci, la fatica condivisa, la soddisfazione di discutere e non chiacchierare, confrontarsi e non competere per l'ultima parola, la certezza di aver contribuito ad un progresso vero per tutti lontano dalla sterile malattia del parlare a vanvera. Tutte queste cose e, soprattutto,  le amicizie preziose e forti che Linux mi ha consentito di creare non sono altro che la cartina di tornasole dell'eticità e bontà di tutto il progetto, un colossale progetto di condivisione della conoscenza in cooperazione ed armonia. Grazie, Linux, hai cambiato la mia vita e quella di chi mi sta intorno. Grazie alla Comunità di Materalinux e buon Linux Day 2011 a tutti.

In (bad, sorry) English:


I met with Linux for the first time in the mid 90s to LAIB 2 of the Turin Polytechnic.
Then, the computers, i286 and i386, went around with DOS and Windows 3.
That computer drew me immediately: it was different from others.
Unfortunately it was of the System Administrator of the computer classroom and approach was virtually impossible.
A couple of years later, thanks to the commendable initiative "A Computer in Every Home" by local government of Basilicata, I was able to buy a PC with the mythical AMD Thunderbird to work alongside my old 486. A beast of machine, for the time, the CPU, driven to madness,  burned in a second in case of breakage of the fan (did not have the safety diode device). Obviously, the announcement of the Government of Basilicata required the presence of a qualifying operating system. And I thought well save you a lot of money by using Linux.
From a formal trick, it became a landmark event.
So, one day, I found myself in a room with my new pc, a 56k external modem on com port (still fully functional) and a series of floppy disk containing a version of Mandrake Linux of wich i can not remember the number.
It was love.
I managed to configure the modem the first time also.
There was an overwhelming love, and a passion of the soul.
After, I tried Mandrake Fedora 2, then 3, then 4 and Fedora 5 with memories of being able to substitute completely for the first time on a Windows business PC.
Since then I have not stopped.
By the second half of the noughties I switched to Debian and Ubuntu, but I could appreciate the specialized distributions like IPCop, Endian, FreeNAS (BSD is that if I am mistaken though) and even openSUSE, not to mention those niche as Pardus Linux. I used Gnome, KDE, Mate, Cinammon and other desktop environments according to my tastes and my needs.
I was able to restore virus infected networks with a small netbook for two hundred €. It has enabled me to work in conditions where the windows machines stoppped working, to retrieve data, I worked from tent cities, to bring the web to people who could not afford to buy a new pc with windows licenses. I was not allowed to be more stressed by ongoing technical support requests from friends and relatives who have migrated from windows to linux. It has enabled me to be master of my digital life in freedom and awareness: when something goes wrong, in general, I know what goes wrong with Linux. And no longer depend on the whims of the multinationals.
Today, I can choose.
But the technical evolution of this story is nothing compared to the human contribution to Linux has brought to my life.
Not only through the people from whom I first encountered online and I learned, later rescued.
I still remember the talk in the workshop that led to these five wonderful experiences that have been the Linux Day Matera. "Ah, you say to kids who use Linux is the way scouts to use the computer?" And I remember the faces, voices, shared the toil, the satisfaction of talk and not talk, meet and do not compete for the final word, be sure to have contributed to real progress for all away from the sterile disease of waffling. All these things and, above all, strong and valuable relationships that Linux has allowed me to create are nothing more than a litmus test of ethics and goodness of the whole project, a massive project of knowledge sharing in cooperation and harmony. With Linux, you changed my life and the lives of those around me. Thanks to the communityand good Materalinux Linux Day 2011 to all.

18 marzo 2011

Linux in Segreteria


Brevissimo e scarno video del passaggi a linux ( Ubuntu 10.10 e Debian 6 ) della Segreteria del Partito Democratico Materano.
Spero di poter postare quanto prima qualcosa di meglio:
  • un'iniziativa pubblica di confronto per stabilire la miglior politica di migrazione
  • e, finalmente, un cronoprogramma della migrazione.
Al lavoro ...