Hello, I would like to know if it is possible to configure the network interfaces, to do as on the picture. I would like openwrt to be my firewall between my internet box and my network.
I would like to have the box as input and the network as output.
Ethernet port ingress and egress by default. Also OpenWrt defines a Loal Area Network (LAN) port(s) and Wide Area Ethernet (WAN or Internet) port. So, can you better describe what function you're refrencing?
Well, of course they're both in and out...traffic goes in both directions.
Which one is the LAN (your network) side and the WAN (modem) depends on the device (what is the maker/name of your OpenWrt device?) and the configuration.
Did you get your device already set up with OpenWrt or do you did it yourself?
For a quick check, set one of your PCs to DHCP and connect it to one of the two ports of the OpenWrt device. You should get an IP address on your PC in the kind of 192.168.1.xxx. If nothing happens, try the other port.
This port would than be your LAN (network) port.
To expand on what @lleachii said: you can literally define any of your ports as the one for the modem to use and any of the others for the swtich and/or optionally other devices. Standard naming convention is to retain the WAN port for uplink to the modem, and LAN1-x as your internal ones.
Looks fine... generally the modem is assigned 192.168.100.1 by default (depending on brand). Recommend you use the internal NIC (eth0) on the RPi4 to be your LAN facing one and put the USB NIC (eth1) on the modem simply in case the USB NIC breaks. This way you will still have LAN access.
Do you really want to have a double-NAT setup? If there are no other devices connected to the modem, and the RPi acts as "the main router", wouldn't you prefer to have a public IP address on it?