I am completely new to OpenWRT. I am hoping it is what I have been looking for.
Full disclosure, I currently use OPNSense for my edge router / firewall. I have been searching for similar software / system to build a DMZ. Everything else to this point has either gone EOL or is not what I am looking for. I am hoping OpenWRT is but I am having trouble gettingit configured. Hopefully I am posting this in the correct location.
I have installed OpenWRT on a Lenovo M920Q with 8 gig memory and a 256 gig SSD. It has an Intel EXPI9404PTLBLK Pro/1000 Pt Quad Port NIC.
I installed OpenWRT by removing the SSD and installing it in a USB adapter and using Rufus to copy the image -- it boots to the command prompt.
I currently only have one cable connected to it (to my LAN) until I can get it configured. ETH1 has obtained an IP from DHCP. However I am unable to access the web interface via that IP (192.168.107.109. Although I am able to ping it from my laptop as well as ping the router currently in place from the OpenWRT box.
I have looked at the quick start guide but it either seems like it is for non PC hardware or is vague. Nothing I have tried provided on those pages work. Most if not all commands can't be found.
OpenWrt's behaviour is largely independent of the target device, so most information will be generic.
By default (on devices like x86), the first detected ethernet port will be lan, the second wan - everything else unconfigured (for you to put into the lan bridge via configuration or more complex setups); wan is obviously firewalled. Depending on the detection order, you might have to test the ports for their function.
If you connect to the lan, you should get an IP via DHCP (if there is no concurrent DHCPd already on your network segment) and be able to connect via ssh and -if you are using a release build/ not a snapshot build- via http and https.
You (should-) have keyboard/ screen debugging availability and access to the system shell, so if things don't work, you can debug this easily. ip a s, lspci -knn, etc. come to mind.
OpenWrt works well and reliably on x86_64, but given the vast diversity of x86_64 systems, it can't be as fine-tuned as for normal devices (which have bespoke images for each device) - and for more exotic hardware, not every imaginable kernel module is preinstalled, which might require a little attention.
I figured it out, when you said " the first detected ethernet port will be lan" I had to try all port but figured out that the LAN port was the onboard NIC. Not the one I wanted to use but that is ok.
Adding on to what @darksky said, you can figure out which device is which using ip (which is Linux's rough equivalent to the BSD ifconfig command).
As you plug and unplug live cables to the NICs, they'll show show that NO-CARRIER in the status line.
$ ip -f link 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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc cake state UP qlen 1000
link/ether 7c:2b:e1:13:63:a7 brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br-lan state DOWN qlen 1000
link/ether 7c:2b:e1:13:63:a8 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
link/ether 7c:2b:e1:13:63:a9 brd ff:ff:ff:ff:ff:ff
5: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br-lan state DOWN qlen 1000
link/ether 7c:2b:e1:13:63:aa brd ff:ff:ff:ff:ff:ff
...
This should let you map the desired devices to logical interfaces. Here I've put eth0 on WAN and the other ones eth1-3 onto a bridge device called br-lan, which I then map to the lan interface.
...
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'
list ports 'eth2'
list ports 'eth3'
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
option peerdns '1'
config interface 'wan6'
option device 'eth0'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix '60'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '10.1.3.1' # The lan gateway address
option netmask '255.255.255.0'
...