Página 2 de 2
Re: Forwarding a subred
Publicado: 25 Mar 2022, 10:57
por egrueda
Sin ver el staus completo, se me ocurre que deberías permitir específicamente el forward.
Del manual de ufw:
Rules for traffic not destined for the host itself but instead for traffic that should be routed/forwarded through the firewall should specify the route keyword before the rule (routing rules differ signifi‐ cantly from PF syntax and instead take into account netfilter FORWARD chain conventions).
Re: Forwarding a subred
Publicado: 30 Mar 2022, 08:26
por tormund1985
egrueda escribió: 25 Mar 2022, 10:57
Sin ver el staus completo, se me ocurre que deberías permitir específicamente el forward.
Del manual de ufw:
Rules for traffic not destined for the host itself but instead for traffic that should be routed/forwarded through the firewall should specify the route keyword before the rule (routing rules differ signifi‐ cantly from PF syntax and instead take into account netfilter FORWARD chain conventions).
Muy buenas de nuevo,
Nada, las reglas están persistentes sin embargo continúa bloqueando el tráfico:
Código: Seleccionar todo
mar 30 08:21:25 sentinel kernel: [UFW BLOCK] IN=eth0 OUT=usb0 MAC=e4:5f:01:28:05:2c:6c:1c:71:27:27:ae:08:00 SRC=192.168.1.108 DST=8.8.8.8 LEN=81 TOS=0x00 PREC=0x00 TTL=63 ID=9446 DF PROTO=UDP SPT=38071 DPT=53 LEN=61
mar 30 08:21:25 sentinel kernel: [UFW BLOCK] IN=eth0 OUT=usb0 MAC=e4:5f:01:28:05:2c:6c:1c:71:27:27:ae:08:00 SRC=192.168.1.108 DST=161.117.253.222 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=56872 DF PROTO=TCP SPT=48699 DPT=42045 WINDOW=14600 RES=0x00 SYN URGP=0
Re: Forwarding a subred
Publicado: 30 Mar 2022, 08:38
por egrueda
tormund1985 escribió: 25 Mar 2022, 10:50También incluí en el rc.local la siguiente regla:
No mezcles ufw y comandos iptables por otro lado.
Si usas ufw para gestionar el firewall, no lo gestiones además por otro lado ni añadas reglas fuera de ufw
Te puedes volver loco para detectar el origen de un problema.
Elimina los comandos iptables "manuales" y reinicia para regarcar el firewall de ucw
Después envíanos un "ufw status verbose" a ver qué reglas tienes y en qué orden
Re: Forwarding a subred
Publicado: 30 Mar 2022, 12:39
por tormund1985
egrueda escribió: 30 Mar 2022, 08:38
tormund1985 escribió: 25 Mar 2022, 10:50También incluí en el rc.local la siguiente regla:
No mezcles ufw y comandos iptables por otro lado.
Si usas ufw para gestionar el firewall, no lo gestiones además por otro lado ni añadas reglas fuera de ufw
Te puedes volver loco para detectar el origen de un problema.
Elimina los comandos iptables "manuales" y reinicia para regarcar el firewall de ucw
Después envíanos un "ufw status verbose" a ver qué reglas tienes y en qué orden
Hecho:
Código: Seleccionar todo
Status: active
Logging: off
Default: deny (incoming), allow (outgoing), allow (routed)
New profiles: skip
To Action From
-- ------ ----
Anywhere on eth0 ALLOW IN Anywhere
Anywhere ALLOW IN 192.168.1.108
Anywhere ALLOW IN 192.168.1.0/24
53/udp ALLOW IN Anywhere
53 ALLOW IN 192.168.1.108
Anywhere (v6) on eth0 ALLOW IN Anywhere (v6)
53/udp (v6) ALLOW IN Anywhere (v6)
Anywhere ALLOW OUT Anywhere on eth0
Anywhere (v6) ALLOW OUT Anywhere (v6) on eth0
Anywhere on usb0 ALLOW FWD Anywhere on eth0
Anywhere (v6) on usb0 ALLOW FWD Anywhere (v6) on eth0
Mil gracias por el interés en resolver el problema.
Re: Forwarding a subred
Publicado: 30 Mar 2022, 12:45
por egrueda
Creo que te faltan líneas de arriba, ¿has ejecutado un "ufw status verbose"?
Re: Forwarding a subred
Publicado: 30 Mar 2022, 12:50
por tormund1985
egrueda escribió: 30 Mar 2022, 12:45
Creo que te faltan líneas de arriba, ¿has ejecutado un "ufw status verbose"?
Editado, disculpa que se me escaparon del copy&paste