Understanding some basics and needing help

Hi, I have a EdgeRouter4 from Ubiquity. I have installed OpenWRT on it and I have a few Linksys routers that I use for wifi.

I would like to make the OpenWRT edge4 device my main router but I'm very new to OpenWRT and struggling with a few items.

  1. I have configured a port with my local network 192.168.123.x and plugged it into my current linksys router to get it internet access and so I can configure it from my main system. The issue is the OpenWRT device started taking over on my network and systems were getting dhcp from it along with it being the gateway. I'm not ready for this. How can I make it so it does not do this while I'm just trying to get it configured?
  2. The Interfaces... When I'm in it the Luci it listed WAN, LAN0 and LAN1 The WAN was setup as a bridge and between what I believe was two interfaces on the unit. I basically want it setup so there is a WAN (Internet) port, and two LAN ports which I can plug in my old linksys router or a computer to gain internet access. Is there a really good guide page/section for fully understanding how to figure this topic out?

You can disable DHCP server for an interface. Network-Interfaces-Edit Interface-DHCP server tab- Ignore Interface-Save and Apply.

It would be easier to post the configuration so we can see what is the problem.

Use ssh to connect to the device.

Please run the following commands (copy-paste the whole block) and paste the output 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; \
uci export network; uci export wireless; \
uci export dhcp; uci export firewall
"kernel": "5.15.150",
"hostname": "OpenWrt",
"system": "UBNT_E300 (CN7030p1.2-1000-AAP)",
"model": "Ubiquiti EdgeRouter 4",
"board_name": "ubnt,edgerouter-4",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "23.05.3",
"revision": "r23809-234f1a2efa",
"target": "octeon/generic",
"description": "OpenWrt 23.05.3 r23809-234f1a2efa"
}
}
package 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 'fd5c:2364:0775::/48'

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

config interface 'lan'
option device 'br-lan'
option proto 'static'
option ip6assign '60'
option gateway '192.168.123.254'
list ipaddr '192.168.123.2/24'
list dns '9.9.9.9'
list dns '192.168.123.254'

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

config interface 'wan6'
option device 'lan2'
option proto 'dhcp'

uci: Entry not found
package dhcp

config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'

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'

package firewall

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

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

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'

When I mentioned WAN above it was around the br-lan interface if my memory is correct.

It's a bit unusual configuration, so let's break it down.
The lan interface is assigned to port lan1. It is using gateway .123.254. Is this a valid upstream router?
wan interface is on port lan0, is there anything connected there?
wan6 interface is on port lan2. This looks wrong as it should be the same as wan.
lan interface is configured to offer DHCP and will advertise itself as router and nameserver. This doesn't look right, since you have .123.254 as gateway.

Yes this is the current linksys all in one I want to replace once I have this unit ready.

Nothing is connected anywhere else but to the physical port eth1 on the unit. That is the other thing I would like to make sure overall that I can easily understand the config to physical port.

Thank you for all your support I'm brand new.

The way you are trying to make it work seems a bit complicated. That's because there is only one interface on OpenWrt acting both as lan and wan and being connected to the lan interface of the ISP router.

I would suggest to reset to defaults then connect the OpenWrt wan port to the lan port of the ISP router. Then connect some devices on the lan ports of OpenWrt. This should work without any additional configuration. When you decide to replace the ISP router with OpenWrt you might need to change the wan interface protocol if your ISP uses something else than DHCP, for example PPPoE.

Ok how do I go about resetting to defaults? I seen an article but did not fully understand which one to use. I'm guessing in the GUI under system > backup/flash firmware > under restore click "perform reset"

I also don't have an ISP router I only have three personal routers. Two for wifi and internet right now.

Also again once I do this how do I tell what physical port maps to the WAN in OpenWRT?

That's right.

That's fine, you can check the protocol used on the internet router.

On Luci, Network-Switch plug in and out a cable and it will show you which port was that.

Sorry for the delay I have been out of the country for the last week.

I have reset the unit and reset the root password.

Alright! And were you able to connect the OpenWrt router's wan port to the network? Did it get an IP from the main router?
Or did you try to change the wan protocol?

1 Like

I got on my laptop and router are plugged into the Openwrt device all is well for now. Thank you for the support!

1 Like