Can anyone help me setup openwrt as a router?

I used openwrt as a vpn gateway before but not as a router. Today I tried to setup openwrt as a router. PPPoE successfully dialed up and got a public ipv4 ip from isp. Devices got ip from openwrt dhcp server. But none of them can reach internet, I don’t know why. And I tried to ask at openwrt forum, but they haven’t approved my account yet.

Here is the step I’ve done
incus launch images:openwrt/24.10 wan0
incus config device add wan0 eth0 nic nictype=physical parent=enp3s0
incus config device add wan0 eth1 nic nictype=physical parent=eno1
incus config device add wan0 ppp unix-char path=/dev/ppp

eth0 is my lan port, eth1 is my wan port.

incus exec wan0 ash
opkg update
opkg remove dnsmasq
mv /etc/config/dhcp /etc/config/dhcp-old
opkg install nano dnsmasq-full 
sed -i 's/procd_add_jail/: \0/g' /etc/init.d/dnsmasq

Removed dnsmasq and installed dnsmasq-full. And restarted wan0.

Here is my /etc/config/network:

config interface 'loopback'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
        option device 'lo'

config interface 'lan'
        option proto 'static'
        option device 'eth0'
        option ipaddr '192.168.0.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option proto 'pppoe'
        option device 'eth1'
        option username 'username'
        option password 'password'
        option ipv6 'auto'
        option keepalive '5 5'

Here is my /etc/config/dhcp:

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        option sequential_ip '1'

config dhcp 'lan'
        option interface 'lan'
        option start '50'
        option limit '200'
        option leasetime '3h'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

That’s all I have configed.

Here’s my config if it helps. It’s sharing the same bridge lan as the host. The “globals” section is for performance improvements. You shouldn’t need to mess with the DHCP config to get it working.

network


config interface 'loopback'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
        option device 'lo'

config globals 'globals'
        option packet_steering '1'
        option steering_flows '256'

config interface 'wan'
        option proto 'dhcp'
        option device 'eth1'
        option peerdns '0'
        list dns '1.1.1.1'
        list dns '1.0.0.1'

config interface 'wan6'
        option proto 'dhcpv6'
        option device 'eth1'
        option reqaddress 'try'
        option reqprefix 'auto'
        option norelease '1'
        option peerdns '0'
        list dns '2606:4700:4700::1111'
        list dns '2606:4700:4700::1001'

config device 'lan_br'
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.0.1'

dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option cachesize '1000'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        list interface 'lan'
        list interface 'wg0'
        option authoritative '1'

config dhcp 'lan'
        option interface 'lan'
        option start '10'
        option limit '200'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'