Raspberry Pi 4 Model B no internet on LAN with PPPoE but works with DHCP

I have installed OpenWRT installed on raspberry pi 4. I am using built-in ethernet for lan and a usb ethernet for wan.

DHCP WAN => Router => Modem/ONT

  1. Internet inside OpenWRT e.g. I can ping 8.8.8.8 after ssh
  2. Internet working on LAN devices

PPPoE WAN => Modem/ONT

  1. PPPoE connection established. OpenWRT WAN gets IP in range 10.x.x.x (I am behind CG-NAT) with gateway set to 202.x.x.x
  2. From within OpenWRT, I have internet connectivity e.g. I can ping 8.8.8.8 after ssh
  3. No internet connectivity on LAN devices

Here are my configs

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

config globals 'globals'

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

config interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '10.55.3.1'
        option device 'br-lan'

config device
        option name 'eth1'

config interface 'wwan_wired'
        option proto 'pppoe'
        option device 'eth1'
        option username 'xxxx'
        option password 'xxxx'
        option force_link '1'

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

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

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

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        list proto 'all'
        option src '*'
        option dest '*'
        option target 'ACCEPT'

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'

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 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'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        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'
config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option cell_density '0'
        option txpower '20'
        option country 'PK'
        option band '5g'
        option htmode 'VHT80'
        option channel 'auto'
        option disabled '1'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'sta'
        option ssid 'xxxx'
        option key 'xxxx'
        option encryption 'sae-mixed'
        option disabled '1'

What is the ip address and subnet that was obtained here? You may have a conflict between your lan and the upstream.

1 Like

Ip address on WAN interface is 10.36.71.14 with subnet mask of /32 and default gateway of 202.163.x.x

Ok…. So I don’t see any conflicts there.

  • Can the Pi running OpenWrt ping google.com or openwrt.org?
  • Does the problem happen for both wired and wifi devices?
  • Can the clients ping 8.8.8.8?

Let’s see your dhcp and wireless files.

1 Like
  • I can ping using OpenWRT luci diagnostic. I can also ping 8.8.8.8 from ssh
  • Clients are not able to ping 8.8.8.8
  • I am only using wired client. Tried both my PC and laptop. They both get correct gateway, ip, subnet from lan interface and is able to connect to ssh of OpenWRT but internet is not working. Doesn't seem to be dns issue as even ip e.g. 8.8.8.8 is not working

Updating original question with wireless and dhcp config

I did a clean install and it seems to be working now. I am not sure what was issue before

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.