I have a RasbperryPi which is connected with Ethernet (eth0) to a VLan (vlan0). This VLan has only access to the Internet and devices in the VLan (vlan0) can not communicate with each other. Furthermore, devices in (vlan0) have no access to all other devices in my house (e.g. NAS etc.) because those are in a second VLan (vlan1).
My PC has only one network interface, which is connected to vlan1. But I want to be able to access my Raspberry Pi from this PC via SSH. Since the Raspberry Pi has wlan0 as a network interface in addition to eth0, my solution would be to route all network traffic through eth0 and only allow SSH connections through wlan0, so that services running on the Pi necessarily use eth0 and wlan0 is really only used for SSH, so that there is no way for any service other than SSH to get into my "private" VLan (vlan1) where it could then access my NAS, for example.
How is this possible? I can't find a real answer on the internet or I don't know what exactly to google for.
ps: on the RaspberryPi runs Ubuntu Server 20.04.4 LTS
Thanks a lot for your answers!