I am building a router with a RPi (Raspbian). It has 3 network interfaces:
- eth0: Connected to the Internet (IP/Gateway from DHCP)
- wlan0, wlan1: local WLAN interfaces (each serving its own SSID as AP)
Moreover a have a VPN connection tun0 to a remote network, which is connected to the internet itself.
Now I want:
- all traffic from wlan0 to be routed through tun0 and
- all traffic from wlan1 to be routed through eth0
In the result I want to have two WLANs, one with direct internet access and one with internet access through the VPN connection.
This was very easy using two different devices, but how to do this with only one default gateway?