MI CONFIGURACION

 

 Instalacion

Instalo Raspian Os 64 Lite 
En el fichero /boot/config.txt modifico estas tres lineas:
hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=4

Configuracion

sudo apt update -y
sudo apt upgrade -y

sudo raspi-config
Performance Options
Fan
Activar control de Temperatura
Puerto 14
60 grados
salir y reiniciar

sudo nano /boot/config.txt
Modificar esta linea:
dtoverlay=gpio-fan,gpiopin=14,temp=50000

Samba

sudo apt install samba -y

sudo su -c "echo '[raiz]
comment = raiz
path = "/"
writeable = yes
guest ok = yes
create mask = 0777
directory mask = 0777
force user = root' >> /etc/samba/smb.conf"

sudo su -c "echo '[root]
comment = root
path = "/root"
writeable = yes
guest ok = yes
create mask = 0777
directory mask = 0777
force user = root' >> /etc/samba/smb.conf"

sudo su -c "echo '[pi]
comment = pi
path = "/home/pi"
writeable = yes
guest ok = yes
create mask = 0777
directory mask = 0777
force user = pi' >> /etc/samba/smb.conf"

sudo nano /etc/samba/smb.conf
Quitar todas las share definition que vienen por defecto

sudo /etc/init.d/smbd restart

VPN PIA

Desinstalar las IP6
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Instalar los paquetes necesarios
sudo apt install bash curl jq wireguard git -y

copiar /opt/pia

IPTABLES

sudo apt install iptables -y

sudo nano /etc/sysctl.conf y activar la linea:
net.ipv4.ip_forward=1

SQLITE3

sudo apt install sqlite3 -y

NEXTPVR

cd /tmp
curl https://nextpvr.com/nextpvr-helper.deb -O
sudo apt install ./nextpvr-helper.deb --install-recommends -y

Parar el servicio y desactivar el arranque automatico:
sudo /opt/nextpvr/shell/server.sh stop
sudo systemctl disable nextpvr-server

ACTUALIZAR NEXTPVR

cd /tmp
curl https://nextpvr.com/nextpvr-helper.deb -O
sudo dpkg -i nextpvr-helper.deb

Parar el servicio y desactivar el arranque automatico:
sudo /opt/nextpvr/shell/server.sh stop
sudo systemctl disable nextpvr-server
sudo reboot

MIS SCRIPTS

Copiar /home/pi/bin

echo '
_IP=$(hostname -I)
_IPUB=$(curl http://ipinfo.io/json)
echo "*******************************************************"
echo "*******************************************************"
echo "*******************************************************"
# Imprimir Ip Local, Ip Publica y ubicacion
printf "Mi direccion IP es: $_IP"
printf "%s\n"
printf "Mi direccion publica es: %s\n$_IPUB %s\n"
echo "*******************************************************"
echo "*******************************************************"
echo "*******************************************************"
' >>/home/pi/.bashrc

Copiar /opt/telegram
Copiar /opt/arranque.sh

Añadir las siguientes programaciones.
sudo crontab -e

@reboot /opt/arranque.sh >/var/log/arranqueINFO.log 2>&1

*/15 * * * * /opt/pia/refresh_pia_port.sh > /var/log/pia_refresh_port.log 2>&1

* * * * * sleep 15 && /opt/telegram/notificaciones.sh >>/var/log/notificacionesINFO.log 2>>/var/log/notificacionesINFO.log

* * * * * sleep 30 && /opt/pia/estadovpn.sh >>/var/log/VPNestadoINFO.log 2>>/var/log/VPNestadoINFO.log


sudo reboot

sudo chmod 755 /root
Copiar /root/.NPVR-data/scripts

Entrar en 192.168.1.24:8866 (admin, password)
Editar el usuario, contraseña, pin y activar el acceso remoto

Firewall

sudo apt install ufw -y

sudo ufw allow from 192.168.1.0/24 to any port 22
sudo ufw allow from 192.168.1.0/24 to any port 137
sudo ufw allow from 192.168.1.0/24 to any port 138
sudo ufw allow from 192.168.1.0/24 to any port 139
sudo ufw allow from 192.168.1.0/24 to any port 445

sudo ufw allow from 192.168.1.0/24 to any port 8866
sudo ufw limit in on pia to 0.0.0.0/0 port 8866

sudo ufw enable

sudo ufw status verbose

Comentarios

Entradas populares de este blog

Instalar PHP en tu Raspberry

Instalar Apache Web Server

Instalar Samba en Raspberry