Ethernet issue with Raspberry Pi 3B+

What I am trying to do:
Internet to RPi 3B+ using Ethernet Adapter which is connected to the Pi. RPi's Ethernet port to PC using ethernet cable.
This is what I tried:
Flashed OpenWRT 19.07.4.
Installed Adguard Home following this guide.
Changed dnsmasq port to 9153 so that Adguard Home's DNS can function. Also added dhcp-alternate-port to the end of the /etc/dnsmasq.conf file so that the DHCP function can be enables in Adguard Home.

I set a Static IP on Interfaces>LAN and on Physical settings tick on "Bridge Interface" and below "Ethernet Adapter "eth0"(lan)" and "Wireless Network Master" is selected.

When I was setting up the Pi, both the Pi and my PC was connected to the router. So both devices were getting internet access.

Problem:
When I connect the internet cable to the Pi's ethernet adapter(eth1), the Pi can get internet through the ethernet adapter. It can provide internet through it's Wifi and provide IP to the wifi connected devices, but can't provide network through the ethernet cable anymore. If I connect both the Pi and PC to the router using cable, I can access the Pi from the desktop.

Can anyone please take a look and tell me what I am doing wrong here?

Output of /etc/config/dhcp:

Summary
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 readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'
        option port '9153'
        list server '127.0.0.1#53'
        option noresolv '1'

config dhcp 'lan'
        option interface 'lan'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        option ignore '1'
        list dhcp_option '6,192.168.0.4'
        list dhcp_option '3,192.168.0.4'

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'

Ouput of /etc/config/network:

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

config globals 'globals'
        option ula_prefix 'fdcd:a8fb:947a::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.0.4'

config interface 'WAN'
        option ifname 'eth1'
        option proto 'pppoe'
        option password 'somethingsomething'
        option ipv6 'auto'
        option username 'someusername'
        option peerdns '0'

Output of /etc/config/firewall:

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

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

config zone
        option name 'wan'
        option output 'ACCEPT'
        option masq '1'
        option mtu_fix '1'
        option input 'DROP'
        option forward 'DROP'
        option network 'wan wan6 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 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'
        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 include
        option path '/etc/firewall.user'

Can you access the Pi from the wired connection but no Internet, or no access at all?

Can you provied the wireless config?

1 Like

After the setup I mentioned above, I can access the Pi using wire only through the router. Direct wired connection to my desktop isn't working, but it can still connect to the internet through the wired ethernet adapter. I could only access the Pi using wire during the first boot when I changed the default Lan Static IP to DHCP Client.

You haven't provided the wireless cfg file.

Wire connected to which port? the onboard or the USB one?

Can you confirm the IPs for the wireless clients? Do they match what you expect (i.e. 192.168.0.x)?

What are you trying to configure here? The default settings should just work

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option leasetime '12h'
	option limit '150'

You haven't provided the wireless cfg file.

I forgot, sorry. Here it is:

cat /etc/config/wireless:
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'HT20'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option key 'something'
        option ssid 'OpenWRT'
        option encryption 'psk2'

Can you confirm the IPs for the wireless clients? Do they match what you expect (i.e. 192.168.0.x)?

Yes, I checked the DHCP setting of Adguard Home and the IPs are of 192.168.0.x.
It's almost like the ethernet port(eth0) starts having a problem after I try to directly connect to it.
Is there a way to check if DHCP lease is working on OpenWRT. I want to disable Adguard Home and try withou it.

I will try with the default options and post back.

Well, you could check what IP do the wired clients get.

1 Like

Disabled dnsmasq and everything seems to be working the way it should. My laptop can get an IP from Adguard Home's DHCP server without any problems.

I know this is a good thing, but I am still unclear why disabling dnsmasq fixed everything. Is there some kind of firewall test to see if everything is functioning the way it is supposed to?