Debian with 2 ethernet as VPN relay (route all traffic from eth0 to eth1 VPN)

gb flag


I got 2 Debian VMs, first one is pptp/wireguard server on WAN and second one's eth0, eth1

Note: WAN IPs written in private ranges Intentionally


I want second VM's eth1 to connect to first VM as VPN client, then run a VPN server on eth0 which routes all traffic through eth1 to the first VM.
Basically, then I can connect to second VM's eth0 then and use first VM's VPN.
Client --> VM2-eth0 --> VM2-eth1 --> VM1-eth0

Please provide details on any required packages (if any) along with iptables rules and other commands

sa flag
Did you set up both VPNs already so you just need help with routing?
Shahaboddin avatar
gb flag
@user253751 Yes, just routing rules plz

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.