Odd Behavior with RPi4 OpenWrt and MoCa Network at home

This is a continuation of my last post that's been archived over on reddit: https://www.reddit.com/r/HomeNetworking/comments/112qh4q/odd_behavior_with_rpi4_openwrt_and_moca_network/ .

tl;dr (do people still use that?): I have an odd issue where I lose access to the LuCi web interface when I enable or plug in the MoCa adapters on my network. Everything will "work" based on the DHCP rules I have, but I can't get to the web interface. And most recently, depending on the whim of the Networking gods, I can end up either with access to LuCi but not access the IPs of the MoCa adapters, or vice versa. Can anyone shed insight on this so I have a more stable way to fix this? Or more layperson way as my partner will never survive if I'm not here and this setup needs a reboot.

In detail:

A lot of the issues still stand, but connections stay "on" despite url access issues since changing the type of adapter used, as suggested in the post above. Also had a very helpful visit from two technicians from my ISP who went above and beyond (I think) to help with some parts of it, changed my splitters in some places and some layouts and added the PoE filter in the correct spot.

The hardware setup and layout is listed below, hate posting this sorta detail but I'm at a loss:

  1. OpenWRT on a Raspberry Pi 4
  2. Netgear Nighthalk in Access Point Mode: RAX200
  3. Netgear Wifi Extender (wired to MoCa, extending with separate wifi network names): EAX20
  4. Three MoCa adapters: ECB7250
  5. Splitters at the entrance: BDC1106H (Extreme), BDS102H (Amphenol), and further away some GE Digital 2-Way Splitter 55288.

I've spent a lot of time trying to get something stable and consistent. This is iteration #6 I think of trying a setup and has been the most consistent, espeicially after not having both wifi points use the same SSID, now we just deal with constantly switching since most devices don't auto switch at all or fast enough. That said, I don't want to try yet another router or anything till maybe WiFi 7 Mesh products are around and cheap. Anyway, thoughts on the issues? Layout?

EDIT1: Per the detailed comment from @krazeh, here's some output from my configs, may not have needed all the comments...:

----------------------------------------
ubus call system board
----------------------------------------
{
	"kernel": "5.4.143",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 3",
	"model": "Raspberry Pi 4 Model B Rev 1.1",
	"board_name": "raspberrypi,4-model-b",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02.0",
		"revision": "r16279-5cc0535800",
		"target": "bcm27xx/bcm2711",
		"description": "OpenWrt 21.02.0 r16279-5cc0535800"
	}
}
----------------------------------------
/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 'fdeb:a778:24cb::/48'

config device
	option name 'someNameDifferentThanOthers'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'eth0'
	option proto 'static'
	option ipaddr 'XXX.XX.XXX.XXX'
	option netmask '255.255.255.0'
	option ip6assign '60'

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

----------------------------------------
/etc/config/wirelessk
----------------------------------------

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
	option htmode 'VHT80'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

----------------------------------------
/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 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'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option force '1'

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 host
	option ip 'XXX.XX.XXX.XXX'
	option dns '1'
	option mac '11:22:33:44:55:66'
	option name 'someNameDifferentThanOthers'

config host
	option name 'someNameDifferentThanOthers'
	option ip 'XXX.XX.XXX.XXX'
	option mac '11:22:33:44:55:66'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option ip 'XXX.XX.XXX.XXX'
	option mac '11:22:33:44:55:66'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'
	option dns '1'

config host
	option mac '11:22:33:44:55:66'
	option dns '1'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip 'XXX.XX.XXX.XXX'
	option name 'someNameDifferentThanOthers'

config host
	option name 'someNameDifferentThanOthers'
	option ip 'XXX.XX.XXX.XXX'
	option mac '11:22:33:44:55:66'

config host
	option name 'someNameDifferentThanOthers'
	option dns '1'
	option ip 'XXX.XX.XXX.XXX'
	option mac '11:22:33:44:55:66'

----------------------------------------
/etc/config/firewall
----------------------------------------
config defaults
	option syn_flood	1
	option input		ACCEPT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

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

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

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
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

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
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

# Allow essential incoming IPv6 ICMP traffic
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

# Allow essential forwarded IPv6 ICMP traffic
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

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
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		false

# include a file with users custom iptables rules
config include
	option path /etc/firewall.user


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option dest		wan
#	option proto	tcp
#	option target	REJECT

# block a specific mac on wan
#config rule
#	option dest		wan
#	option src_mac	00:11:22:33:44:66
#	option target	REJECT

# block incoming ICMP traffic on a zone
#config rule
#	option src		lan
#	option proto	ICMP
#	option target	DROP

# port redirect port coming in on wan to lan
#config redirect
#	option src			wan
#	option src_dport	80
#	option dest			lan
#	option dest_ip		192.168.16.235
#	option dest_port	80
#	option proto		tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#	option src		wan
#	option src_dport	22001
#	option dest		lan
#	option dest_port	22
#	option proto		tcp

### FULL CONFIG SECTIONS
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port	80
#	option dest		wan
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp
#	option target	REJECT

#config redirect
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port		1024
#	option src_dport	80
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp

And to the specific questions:

  • Are the RAX200 and EAX20 running OEM firmware?
    • Yes, they are running OEM firmware as updated to whatever's on Netgear's site.
  • Are they setup as dumb APs (so not running DCHP servers, DNS, firewalls etc.)?
    • This is correct, the RAX is setup in AP mode with no firewall, DHCP, or DNS options. And the EAX is in Extender Mode which I understand to be like Access Point Mode
  • How do the MoCa adapters obtain IP addresses? DHCP? Static?
    • I set up static leases in LuCi for them and many (but not all) other devices (hence the long host list above). Currently, however, they don't show up in the lease list, despite seemingly working... I think when I have the reboot order flipped, they are accessible, but the LuCi UI is not, which is my main issue... (I think)
  • Are they in the same subnet as other devices?
    • They... Should be. Again, this is part of the core of my issues in troubleshooting as I can't seem to get access to them and OpenWRT at the same time.

We really need far more information to even begin to guess what the issue(s) might be.

The bare minimum starting point is your OpenWRT config. 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/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Are the RAX200 and EAX20 running OEM firmware? Are they setup as dumb APs (so not running DCHP servers, DNS, firewalls etc.)?

How do the MoCa adapters obtain IP addresses? DHCP? Static? Are they in the same subnet as other devices?

1 Like

There are two major things to watch out for when building a network such as this one.

  1. L2 network loops. Especially when multiple interconnect technologies are involved, you need to be sure there is only exactly one network path from each point to every other. For example many cable modem gateways contain a MoCA adapter bridged to the LAN and feeding back out on the cable. If you're going to use your own adapter to do this, the internal one must be disabled. "Wifi extenders" fed by Ethernet need to have any wireless uplinks (AP-STA or mesh technology) disabled.
  2. Multiple DHCP servers. If more than one DHCP server is active on the network, a race condition will exist where some DHCP clients become improperly configured because an invalid server answered them. OpenWrt by default contains a DHCP server which needs to be turned off when not using the device as a main router. Stock firmware in home routers also requires turning off the default DHCP server when you use them as wifi APs instead of routers.

Appreciate your patience, I'll update the post to reflect the suggested items here, hopefully as needed without exposing anything major on my end...

You've overly sanitised the configs which renders them a lot less useful for troubleshooting. You don't need to hide RFC1918 addresses (i.e. private IP addresses such as 192.168.x.x). Public IP addresses and mac addresses are fine to remove.

Also, please don't edit previous posts to add additional/new information. Create a new post and add the information there. It becomes very difficult to follow a thread with previous posts being edited.

Can you provide the output of ip ro and ip ru?

1 Like

Sure, and here's a repost of the cat commands:

----------------------------------------
ubus call system board
----------------------------------------
{
	"kernel": "5.4.143",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 3",
	"model": "Raspberry Pi 4 Model B Rev 1.1",
	"board_name": "raspberrypi,4-model-b",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02.0",
		"revision": "r16279-5cc0535800",
		"target": "bcm27xx/bcm2711",
		"description": "OpenWrt 21.02.0 r16279-5cc0535800"
	}
}
----------------------------------------
/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 'fdeb:a778:24cb::/48'

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

config interface 'lan'
	option device 'eth0'
	option proto 'static'
	option ipaddr '192.168.66.67'
	option netmask '255.255.255.0'
	option ip6assign '60'

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

----------------------------------------
/etc/config/wirelessk
----------------------------------------

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
	option htmode 'VHT80'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

----------------------------------------
/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 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'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option force '1'

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 host
	option ip '192.168.66.30'
	option dns '1'
	option mac '11:22:33:44:55:66'
	option name 'OctoCR10'

config host
	option name 'Vigoroth'
	option ip '192.168.66.126'
	option mac '11:22:33:44:55:66'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.184'
	option name 'LanExtenderDining'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.185'
	option name 'LanExtenderRecroom'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.100'
	option name 'lanRouterMain'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.234'
	option name 'LanSwitchBilly'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.200'
	option name 'LanMoCaLiving'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.201'
	option name 'LanMoCaWFH'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.202'
	option name 'LanMoCaMaker'

config host
	option dns '1'
	option ip '192.168.66.205'
	option mac '11:22:33:44:55:66'
	option name 'LanExtenderOffice'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.115'
	option name 'HubHubitat'

config host
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.130'
	option name 'OctoMini'
	option dns '1'

config host
	option mac '11:22:33:44:55:66'
	option dns '1'
	option ip '192.168.66.110'
	option name 'ThermostatOffice'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.111'
	option name 'ThermostatLiving'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.112'
	option name 'ThermostatMaster'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.113'
	option name 'ThermostatDining'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.114'
	option name 'ThermostatKids'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.190'
	option name 'LightSwitchKids'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.191'
	option name 'LightSwitchMasterEntry'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.192'
	option name 'LightSwitchMaster'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.193'
	option name 'LightSwitchBalconyEast'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.194'
	option name 'LightSwitchBalconyNorth'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.195'
	option name 'LightSwitchFireplace'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.196'
	option name 'LightSwitchHallway'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.197'
	option name 'LightSwitchOffice'

config host
	option dns '1'
	option mac '11:22:33:44:55:66'
	option ip '192.168.66.165'
	option name 'HubSmartthings'

config host
	option name 'LIBP45P-118446R'
	option ip '192.168.66.135'
	option mac '11:22:33:44:55:66'

config host
	option name 'HubHubitatC8'
	option dns '1'
	option ip '192.168.66.116'
	option mac '11:22:33:44:55:66'

----------------------------------------
/etc/config/firewall
----------------------------------------
config defaults
	option syn_flood	1
	option input		ACCEPT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

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

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

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
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

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
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

# Allow essential incoming IPv6 ICMP traffic
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

# Allow essential forwarded IPv6 ICMP traffic
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

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
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		false

# include a file with users custom iptables rules
config include
	option path /etc/firewall.user


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option dest		wan
#	option proto	tcp
#	option target	REJECT

# block a specific mac on wan
#config rule
#	option dest		wan
#	option src_mac	00:11:22:33:44:66
#	option target	REJECT

# block incoming ICMP traffic on a zone
#config rule
#	option src		lan
#	option proto	ICMP
#	option target	DROP

# port redirect port coming in on wan to lan
#config redirect
#	option src			wan
#	option src_dport	80
#	option dest			lan
#	option dest_ip		192.168.16.235
#	option dest_port	80
#	option proto		tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#	option src		wan
#	option src_dport	22001
#	option dest		lan
#	option dest_port	22
#	option proto		tcp

### FULL CONFIG SECTIONS
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port	80
#	option dest		wan
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp
#	option target	REJECT

#config redirect
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port		1024
#	option src_dport	80
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp

ip ro:
default via xx.yyy.gg.1 dev eth1  src xx.yyy.hh.iii
xx.yyy.gg.0/20 dev eth1 scope link  src xx.yyy.hh.iii
192.168.66.0/24 dev eth0 scope link  src 192.168.66.67
ip ru
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

That should be
"accept"
"accept"
"reject"
How did you compile your first boot?

Did you use this https://firmware-selector.openwrt.org/?version=22.03.5&target=bcm27xx%2Fbcm2711&id=rpi-4
and choose: Customize installed packages and/or first boot script?

No. The default state for the openwrt wan zone is reject for input and forward, accept for output.

Under no circumstances should input be set to accept when the upstream is untrusted (i.e. the internet).

1 Like

Well, then something is totally wrong with my setup:
If I reject input from the wan to the lan it would not let me back into the firewall edit menu;
luckily it let me change it back in the Firewall Zone Settings.

And ShieldsUp reported as far as the internet thinks, my public address is not in use.

Great, ssdd.

Unfortunately still haven't found a solution. What also is a change, is that my most recent restart led to not being able to access LuCi or The moca Adapters.

I used wireshark as a suggestion and, though I'm no network admin, I didn't see anything else besides OpenWRT offering to be a DHCP server, that said.... I can't seem to access the TPLink Switches Web UI. Seems that's a common error with them sometimes. With a correct ID and Password I get one error, with incorrect credentials it correctly says they're wrong. Again though, I don't think they're competing as DHCP servers...

I would personally try to simplify this first until there is a stable state where everything works: disconnect disconnected all MoCa adapters from their splitters and then add them one at a time. First only Master, then Master + only A, then Master + only B.

2 Likes

I have tried this, unfortunately first moca gets connected to ethernet of the Nighthalk, but nothing else, no access etc. Seems to be about the same. But will try again...

One thing that ran across my mind is just plugging a laptop or other computer directly into the ethernet on a moca device on the network and seeing what ipconfig or similar gives me...

First you should test your MoCa adapters in the same room to be sure they are all configured to authenticate and link with each other.

Yes that is what you should do, while it is connected to the main one (which has Ethernet to the router) with a short coax cable of course.

MoCa is a layer 2 bridge so it is not essential that the adapters themselves hold an IP address during operation.