Edit2: Original post, look below for an Update.
I have a Raspberry Pi 4 that is both connected to a wireless LAN with an internet connection and a router that connects a different local network. The wired connection needs a static IP address while the wireless IP address is given by dhcp. The setup can be found in the following picture.
What I am trying to do is to recieve a message from the internet and send it to a computer that is part of the wired LAN. I do this with a python script. For this porpuse both connections have to work at the same time. But it turns out that I can only use either the wireless LAN that has a connection to the internet or the wired local network. I did some research on this problem with no solution yet. But I am assuming that I have add some more information to the routing table of the raspi. Other posts on similar problems said that it had to do with "bridging" eth0 and wlan0. Sorry I am a newbie on this and I would really appreciate your help.
Edit: Posting output of ip a && ip r
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:a6:32:f8:43:f0 brd ff:ff:ff:ff:ff:ff
inet 192.168.67.217/24 brd 192.168.67.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::1a14:a884:9c52:6e39/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether dc:a6:32:f8:43:f2 brd ff:ff:ff:ff:ff:ff
inet 192.168.66.177/24 brd 192.168.66.255 scope global noprefixroute wlan0
valid_lft forever preferred_lft forever
inet6 fe80::bb1c:f878:ee9b:ae5a/64 scope link
valid_lft forever preferred_lft forever
default via 192.168.67.10 dev eth0 src 192.168.67.217 metric 202
default via 192.168.66.160 dev wlan0 src 192.168.66.177 metric 303
192.168.66.0/24 dev wlan0 proto dhcp scope link src 192.168.66.177 metric 303
192.168.67.0/24 dev eth0 proto dhcp scope link src 192.168.67.217 metric 202
Edit2: More detailed descritption of my problem.
So it seems like I did not describe my problem clearly enough, so here is another try.
I am running a Raspberry Pi that runs a python script that is supposed to receive a measured value from an MQTT-Broker (test.mosquitto.org). The same python script is supposed to connect to a DDC-device (via BACnet) in order to write the measured value that was received by the MQTT-Broker into a BACnet-Object that is part of the DDC-device.
To do all of this the raspi needs to be connected to the local (wired) network (where the DDC-device is connected) with a static IP, because the python script requires this. The local network does not have access to the internet. At the same time the raspi needs an internet connection to connect to the MQTT-broker (test.mosquitto.org). This is established via a wireless connection to another network. Here I can choose between dhcp an a static IP. At the moment I am using a static IP both in the wireless an wired network.
The detailed setup of the network can be found below:
Don't get confused by all the VPN-stuff that is goint on here. This part of the network works just fine. I know this, because I have run the python script (that is suppossed to run on the raspi) on a windows laptop and everything is working. The value can be written or sent to the DDC-device without any problems, while the laptop receives the value from the MQTT-broker.
I the static IPs and the router-IPs for eth0 and wlan0 on the GUI of raspbian "Wireless & Wired Network Settings". I did not use command lines to do that.
Both connections work just fine, when only one is active at a time. But when I am activating both connections, only the eth0 is working. I do not have access to the internet.
As I managed to make the python script run on a windows-laptop I assume that there is a setting that the raspi is missing that tells it when to use the eth0 and when wlan0. Does this have anything to do with the routing table? Is there a way to tell the raspi to send every request to both eth0 and wlan0? Or ist there a way to tell the raspi that for connections to test.mosquitto.org it is supposed to use only wlan0?
ip a && ip r