I'm posting here because this seems like a general Debian/Ubuntu issue, and not a Raspberry pi-specific issue.
I want to bridge my wlan0 and eth0 ports on my Raspberry Pi (Raspbian 10/Buster), so that I can share my internet via my raspberry pi to a portable device that can only receive internet via ethernet.
While I know that creating a bridge with wlan0 is technically impossible, I know that I can reach similar results.
Edit: What I've tried so far (as recommended on many pages, for example here and here):
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -A FORWARD --in-interface eth0 -j ACCEPT
sudo iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE
iw dev wlan0 set 4addr on
brctl addbr mybridge
brctl addif mybridge eth0
brctl addif mybridge wlan0
This does not work or help.
The only thing that does help is installing network-manager-gnome and activating the Shared to other computers-setting. This is very simple and works like a charm. However - I want my device (that I connected to the RPi with an ethernet cable) to also have an IP-address in the same network/subnet as the wlan0-interface is, so that other devices on the network will be able to reach it. Right now, it's getting addresses in the 10.42.0.1-range (which, according to this is a built-in feature..).
I've tried setting static IP-addresses on the Pi and the device, but that didn't help (they could only reach each other).
What is the best solution to this?