Is it possible and how I should do it to setup a VPN gateway using openvpn on interface eth1 and also have other interface eht0 as normal host user without VPN?
I want to setup VPN gateway on eth1.
some guides that I found: OpenVPN and gateway on linux, https://ephams.com/2019/02/turns-your-raspberry-pi-into-a-vpn-gateway/.
And leave eth0 as normal user host.
Currently on my RPI I have docker servers running's including pihole as DNS for the entire network.
What I want is that for example from AppleTV/Notebook/SmartTV, change the gateway IP to the IP RPI(eth1) to access VPN.
Or set as always those specific devices to gateway RPI and with some script(bash/python) enable and disable the openvpn.
I will use the VPN for stream content only, so is not always needed to be active.
Device:
Raspberry Pi 4B
Integrate gigabit port ethernet (eth0)
Usb3-ethernet adapter gigabit TP-LINK (eth1)
Router(TP-Link Archer C80, no vpn feature)
Network
Internet --(ethernet)-- Router(DHCP) -- Switch
From Switch:
Raspberry Pi(DNS with pihole) (ethernet eth0)
Apple TV (ethernet)
PC Desktop (ethernet)
Notebook (Wifi)
Note: AppleTV/SmartTV doesn't have dedicate VPN apps to do it there.
I tried looking on internet but all guides are done to set the entire device to be VPN gateway and not specific interfaces.
For example I read something about Enable ip forwarding, but it affect the entire device and not a specific interface (net.ipv4.ip_forward=1)