Score:0

How to setup a VPN Gateway + normal host with 2 interfaces same server

bv flag

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)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.