Menú alternativo
Alternar el menú de preferencias
Menú alternativo personal
No has accedido
Tu dirección IP será visible si haces alguna edición

Diferencia entre revisiones de «CachyOS»

De TechShareRoom wiki
Sin resumen de edición
Sin resumen de edición
 
(No se muestran 2 ediciones intermedias del mismo usuario)
Línea 40: Línea 40:
</syntaxhighlight>
</syntaxhighlight>


Cambiar esto:
<syntaxhighlight lang="bash" copy>
<syntaxhighlight lang="bash" copy>
#!/usr/sbin/nft -f
#!/usr/bin/nft -f
# vim:set ts=2 sw=2 et:


# nftables.conf para PC escritorio con aMule
# IPv4/IPv6 Simple & Safe firewall ruleset.
# - Todo entrante bloqueado por defecto
# More examples in /usr/share/nftables/ and /usr/share/doc/nftables/examples/.
# - Saliente permitido
# - Loopback y ICMP permitidos
# - Puertos aMule abiertos
# - SSH abierto opcional (borra si no lo usas)


destroy table inet filter
table inet filter {
table inet filter {
  chain input {
    type filter hook input priority filter
    policy drop


     chain input {
     ct state invalid drop comment "early drop of invalid connections"
        type filter hook input priority 0; policy drop;
    ct state {established, related} accept comment "allow tracked connections"
    iif lo accept comment "allow from loopback"
    ip protocol icmp accept comment "allow icmp"
    meta l4proto ipv6-icmp accept comment "allow icmp v6"
    tcp dport ssh accept comment "allow sshd"
    pkttype host limit rate 5/second counter reject with icmpx type admin-prohibited
    counter
  }
  chain forward {
    type filter hook forward priority filter
    policy drop
  }
}
</syntaxhighlight>


        # Rechazar conexiones inválidas
Por esto:
        ct state invalid drop comment "early drop of invalid connections"


        # Permitir conexiones ya establecidas o relacionadas
<syntaxhighlight lang="bash" copy>
        ct state { established, related } accept comment "allow tracked connections"
#!/usr/sbin/nft -f


         # Loopback
table inet filter {
         iif "lo" accept comment "allow loopback"
    chain input {
 
         type filter hook input priority 0; policy drop;
         # ICMP (ping)
          
         ip protocol icmp accept comment "allow icmp"
         # UDP aMule PRIMERO (antes de ct state)
         ip6 nexthdr icmpv6 accept comment "allow icmp v6"
         udp dport 4672 accept comment "aMule Kad UDP FIRST"
 
         udp dport 4665 accept comment "aMule UDP"  
        # Puertos aMule
         tcp dport 4662 accept comment "aMule TCP"
         tcp dport 4662 accept comment "aMule TCP"
        udp dport 4665 accept comment "aMule UDP"
         tcp dport 4642 accept comment "aMule Webserver"
         tcp dport 4642 accept comment "aMule Webserver"
 
       
         # (Opcional) SSH - borrar si no usas
        # AHORA ct state
         tcp dport 22 accept comment "SSH"
        ct state invalid drop comment "early drop invalid"
 
        ct state { established, related } accept comment "allow tracked"
         # Limitar paquetes de otros tipos para no saturar
       
         meta pkttype host limit rate 5/second burst 5 packets counter packets 0 bytes 0 reject with icmpx admin-prohibited
        # Loopback
        iif "lo" accept
       
        # ICMP
        ip protocol icmp accept
        ip6 nexthdr icmpv6 accept
       
         # SSH rate-limited
         tcp dport 22 ct state new limit rate 15/minute accept comment "SSH"
       
         # Anti-spoofing
         meta pkttype host limit rate 5/second burst 5 packets reject with icmpx admin-prohibited
     }
     }
 
   
     chain forward {
     chain forward { type filter hook forward priority 0; policy drop; }
        type filter hook forward priority 0; policy drop;
     chain output { type filter hook output priority 0; policy accept; }
    }
 
     chain output {
        type filter hook output priority 0; policy accept;
    }
 
}
}
</syntaxhighlight>
</syntaxhighlight>

Revisión actual - 23:51 3 feb 2026

Personalización

  • Usar paru para instalar paquetes AUR
sudo pacman -S paru --noconfirm --needed

En Octopi - Herramientas - Opciones - AUR - seleccionar paru y activar --noconfirm

  • Desactivar Vista general, en Efectos de Escritorio lo puedes quitar
  • Mostrar configuración del Panel (inferior) en otras pantallas - Entrar en modo edición y clonar en la otra pantalla
  • Quitar zona de adhesión en el centro - Gestión de ventanas - Comportamiento de las ventanas - Movimiento - Zona de adhesión en el centro - Ninguna
  • Si tienes problemas con periféricos USB cuando se inicia el sistema usar script de reset de USB. Por ejemplo reset-usb
sudo ~/.local/bin/reset-usb

Actualización

sudo pacman -Syu

Si tienes problemas con los mirrors al actualizar:

sudo cachyos-rate-mirrors

Keyring (Chrome based browsers)

Deshabilitar kwallet si cualquier otra app no funciona bien, instalar gnome-keyring y poner contraseña vacía cuando pregunte al abrir la app.

Energía

  • Configurar modos para que en caso de cambio no haya incompatibilidad al restaurar el equipo. Por ahora, se desactiva que se suspenda.
  • Restaurar sesión - Comenzar con una sesión vacía.

Firewall

sudo nft list ruleset
sudo systemctl enable --now nftables
sudo systemctl status nftables
sudo nano /etc/nftables.conf

Cambiar esto:

#!/usr/bin/nft -f
# vim:set ts=2 sw=2 et:

# IPv4/IPv6 Simple & Safe firewall ruleset.
# More examples in /usr/share/nftables/ and /usr/share/doc/nftables/examples/.

destroy table inet filter
table inet filter {
  chain input {
    type filter hook input priority filter
    policy drop

    ct state invalid drop comment "early drop of invalid connections"
    ct state {established, related} accept comment "allow tracked connections"
    iif lo accept comment "allow from loopback"
    ip protocol icmp accept comment "allow icmp"
    meta l4proto ipv6-icmp accept comment "allow icmp v6"
    tcp dport ssh accept comment "allow sshd"
    pkttype host limit rate 5/second counter reject with icmpx type admin-prohibited
    counter
  }
  chain forward {
    type filter hook forward priority filter
    policy drop
  }
}

Por esto:

#!/usr/sbin/nft -f

table inet filter {
    chain input {
        type filter hook input priority 0; policy drop;
        
        # UDP aMule PRIMERO (antes de ct state)
        udp dport 4672 accept comment "aMule Kad UDP FIRST"
        udp dport 4665 accept comment "aMule UDP" 
        tcp dport 4662 accept comment "aMule TCP"
        tcp dport 4642 accept comment "aMule Webserver"
        
        # AHORA ct state
        ct state invalid drop comment "early drop invalid"
        ct state { established, related } accept comment "allow tracked"
        
        # Loopback
        iif "lo" accept
        
        # ICMP
        ip protocol icmp accept
        ip6 nexthdr icmpv6 accept
        
        # SSH rate-limited
        tcp dport 22 ct state new limit rate 15/minute accept comment "SSH"
        
        # Anti-spoofing
        meta pkttype host limit rate 5/second burst 5 packets reject with icmpx admin-prohibited
    }
    
    chain forward { type filter hook forward priority 0; policy drop; }
    chain output { type filter hook output priority 0; policy accept; }
}
sudo nft -f /etc/nftables.conf
sudo systemctl enable --now nftables
sudo nft list ruleset