RB-Pi 4B, unable to connect to WAN

Hello, I've been trying to use a Raspberry Pi 4 as an OpenWRT router for while now with little success.

I apologise for my lack of networking know-how, the below probably isn't enough information to diagnose my issue. But I'll provide any other logs that are required.

My setup:

  • USB-A > RJ-45 dongle connected to my modem (technicolor TC4400VDF).

  • On board RJ-45 & Wi-FI connected to LAN.

I have the right drivers installed for the dongle.

The modem has 2 RJ-45 ports, one is plugged into the official (non OpenWRT compatible) Vodafone router, and one is plugged in to my pi.
I've tried only plugging in the Pi, but still no luck.
The hope is to have two LANs one for me, one for my family.

So far, over two days, the best I've achieved is a working LAN & WLAN and a WAN interface gets assigned a 30s DHCP lease, that does not get resigned without resting the modem.
The ipv4 IP that gets assigned to the wan interface is 192.168.100.10/24.

During the period when I have a DHCP lease, I still do not have any internet.
I've tried pinging domain names "voidlinux.org" and IPs "1.1.1.1", but no luck.

I've not changed anything in firewall settings, or anything really besides what should be the bare minimum required to get internet.
So it's almost a stock install.

I'm rather confused, in the guides I've followed, it "just worked".
Namely: YT link
I went to this guide after I also had little luck with following the official documentation.

Could this be a problem with my ISP? That is, Vodafone, now annoyingly known as "one.nz". Or am I missing something.

Thanks.

ip addr output during the 30s lease:

root@OpenWrt:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
    link/ether d8:3a:dd:a8:c6:37 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether 00:e0:6c:79:80:99 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.10/24 brd 192.168.100.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::2e0:6cff:fe79:8099/64 scope link 
       valid_lft forever preferred_lft forever
4: phy0-ap0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN qlen 1000
    link/ether da:3a:dd:a8:c6:39 brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether d8:3a:dd:a8:c6:37 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fe80::da3a:ddff:fea8:c637/64 scope link 
       valid_lft forever preferred_lft forever

most likely your eth1/WAN port not being assigned to the wan firewall zone ... ?

as for the built in wireless on the Pi, don't bother.


Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/firewall

I have eth1 inside the wan firewall zone.
The outputs of the commands you requested:

root@OpenWrt:~# ubus call system board
{
        "kernel": "6.6.93",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 3",
        "model": "Raspberry Pi 4 Model B Rev 1.5",
        "board_name": "raspberrypi,4-model-b",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "24.10.2",
                "revision": "r28739-d9340319c6",
                "target": "bcm27xx/bcm2711",
                "description": "OpenWrt 24.10.2 r28739-d9340319c6",
                "builddate": "1750711236"
        }
}
root@OpenWrt:~# cat /etc/config/network

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 ula_prefix 'fde5:f555:23aa::/48'
        option packet_steering '1'

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

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

config interface 'WAN'
        option proto 'dhcp'
        option device 'eth1'


root@OpenWrt:~# cat /etc/config/firewall

config defaults
	option syn_flood '1'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'

config zone
	option name 'lan'
	list network 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	list network 'WAN'

config forwarding
	option src 'lan'
	option dest '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 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'
	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'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

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'

As for the Wi-Fi on the Pi, thankfully I plan to use Ethernet exclusively.
However for now I'm using wlan to ssh using my RJ-45 free laptop.

OpenWRT is case sensitive, probably better to keep the name "wan", in lower case.

I changed all instances of 'WAN' to 'wan', then rebooted. Unfortunately, that wasn't the cause of the issue. Any other ideas?

Sorry, I figured out my issue:
My ISP (one nz/vodafone) required I have a VLAN with VLAN ID 10 assigned to the wan port set up.
The documentation on their website was not great.
The following was added to /etc/config/network:

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '10'
	option ports '1t'

config interface 'VLAN10'
	option proto 'dhcp'
	option device 'eth1.10'
	option broadcast '1'

-Thanks.