I HAVE PREPARED a simplified config version and restated the question as it seems to have nothing to do with Vlans or pppOE.
Later in this thread is a simplified test environment.
The goal is redirect lan traffic to a protonVPN and guest traffic directly to WAN.
It works at first but after restarting interfaces (no changes in config) it stops working
I have configured in my router a vlan (11) and a WLan that are connected to a guest lan that should access internet directly through the wan interface and not be able to connect to lan or other internal lans.
I can connect to WLAN and to the port 3 that is assigned to guest 11 vlan, I get my IP address correctly.
I can ping the router in guest port (192.168.0.1) but cannot ping out (for exemple to 1.1.1.1)
I have read the openwrt manual about configuring vlans and other threads.
I have looked at the firewall config and and activated the dhcp and dns rules, but still not working.
I cannot finde where the error is.
this is network config
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
option flow_offloading '1'
option flow_offloading_hw '1'
config zone 'lan'
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option mtu_fix '1'
list network 'lan'
list network 'wgVPN'
config zone 'wan'
option name 'wan'
option output 'ACCEPT'
option forward 'REJECT'
option input 'REJECT'
option masq '1'
list network 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fc00::/6'
option dest_ip 'fc00::/6'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
list icmp_type 'bad-header'
list icmp_type 'destination-unreachable'
list icmp_type 'echo-reply'
list icmp_type 'echo-request'
list icmp_type 'neighbour-advertisement'
list icmp_type 'neighbour-solicitation'
list icmp_type 'packet-too-big'
list icmp_type 'router-advertisement'
list icmp_type 'router-solicitation'
list icmp_type 'time-exceeded'
list icmp_type 'unknown-header-type'
option dest 'lan'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
config rule
option name 'Support-UDP-Traceroute'
option src 'wan'
option dest_port '33434:33689'
option proto 'udp'
option family 'ipv4'
option target 'REJECT'
option enabled '0'
config include
option path '/etc/firewall.user'
config zone
option name 'iot'
option output 'ACCEPT'
option forward 'REJECT'
option input 'ACCEPT'
list network 'iot'
config forwarding
option src 'iot'
option dest 'lan'
config forwarding
option src 'lan'
option dest 'iot'
config redirect
option target 'DNAT'
option name 'https al servidor'
list proto 'tcp'
option src 'wan'
option src_dport '443'
option dest 'lan'
option dest_ip '10.100.101.1'
option dest_port '443'
config redirect
option target 'DNAT'
option name 'QBelt al servidor'
list proto 'udp'
option src 'wan'
option src_dport '443'
option dest 'lan'
option dest_ip '10.100.101.1'
option dest_port '443'
config rule 'wg'
option name 'Allow-WireGuard'
option proto 'udp'
option target 'ACCEPT'
option dest_port '51820'
option src 'wan'
config zone
option name 'guest'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'guest'
config forwarding
option src 'guest'
option dest 'wan'
config rule
option dest_port '53'
option src 'guest'
option name 'Allow DNS guest'
option target 'ACCEPT'
list proto 'tcp'
list proto 'udp'
config rule
option target 'ACCEPT'
option proto 'udp'
option src 'guest'
option dest_port '67'
option family 'ipv4'
option name 'Allow DHCP guest'
config forwarding
option src 'lan'
config zone
option name 'protonVPN'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
list network 'protonVPNES'
config forwarding
option src 'lan'
option dest 'protonVPN'
config include 'pbr'
option fw4_compatible '1'
option type 'script'
option path '/usr/share/pbr/firewall.include'
config zone
option name 'isplan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'isplan'
option masq '1'
config forwarding
option src 'lan'
option dest 'isplan'
And this my network config (there is another iot vlan, a protonvpn to connect lan outside via VPN and a wgguard vgVPN accepting connections from wan to get access to lan from outside).
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option packet_steering '1'
option ula_prefix 'fd84:a45b:0c21::/48'
config interface 'lan'
option proto 'static'
option device 'br-lan.1'
option delegate '0'
list ip6class 'local'
option ip6assign '48'
option ip6ifaceid '::1'
list ipaddr '10.100.100.1/22'
config interface 'wan'
option device 'wan'
option proto 'pppoe'
option username 'xxxxxxxx'
option password 'xxxxxx'
option ipv6 'auto'
option peerdns '0'
list dns '10.2.0.1'
config device
option type 'bridge'
option name 'br-lan'
option igmp_snooping '1'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'lan1'
list ports 'lan2'
list ports 'lan4'
config bridge-vlan
option device 'br-lan'
option vlan '10'
list ports 'lan4:t'
config bridge-vlan
option device 'br-lan'
option vlan '11'
list ports 'lan3'
list ports 'lan4:t'
config interface 'iot'
option proto 'static'
option device 'br-lan.10'
option ipaddr '10.200.200.1'
option netmask '255.255.252.0'
config interface 'guest'
option proto 'static'
option device 'br-lan.11'
option ipaddr '192.168.0.1'
option netmask '255.255.255.0'
option type 'bridge'
list dns '1.1.1.1'
list dns '8.8.8.8'
config interface 'wgVPN'
option proto 'wireguard'
option listen_port '51820'
option private_key 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX='
list addresses '192.168.21.1/24'
option peerdns '0'
list dns '10.100.100.1'
config wireguard_wgVPN 'wgclient'
option description 'movilFernando'
option route_allowed_ips '1'
option persistent_keepalive '25'
option public_key 'XXXXXXXXXXXXXXXXX='
option private_key 'XXXXXXXXXXXXXXXXXXXX='
list allowed_ips '192.168.21.3/32'
config interface 'protonVPNES'
option proto 'wireguard'
option private_key 'XXXXXXXXXXXXXXXXXXXX='
list addresses '10.2.0.2/32'
list dns '10.2.0.1'
config wireguard_protonVPNES
option description 'Configuración del par importada'
option public_key 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX='
list allowed_ips '0.0.0.0/0'
option endpoint_host '130.195.255.68'
option endpoint_port '51820'
option route_allowed_ips '1'
config interface 'isplan'
option proto 'static'
option device 'wan'
option ipaddr '192.168.1.2'
option netmask '255.255.255.0'
config device
option type '8021q'
option ifname 'wan'
option vid '3'
option name 'wan.3'
config interface 'voIP'
option proto 'dhcp'
option device 'wan.3'