Page 1 of 1

Network setup. Vpnin and vpnout as gateway

Posted: Thu May 13, 2021 2:00 pm
by daft_dutch
Hi. Have have a home network with several machines.
(Mole) with openvpn as client connecting to a vpn service on the web.
(Digger) with openvpn as server that i can connect to my local network remotely.

Now i want to use my phone or my laptop to make a vpn connection to my home network. Using digger Be able to reach my local network and then use the vpn of mole to connect to the internet.

I think that if i tell my vpn clients (phone and laptop) to use mole as gateway i have a working situation.

But im unable to set it. (Im in the park at my phone)
push "remote-gateway 1 2.3.4" isnt working.

Re: Network setup. Vpnin and vpnout as gateway

Posted: Thu May 13, 2021 2:11 pm
by daft_dutch
Toughti had it running but tests failed

Re: Network setup. Vpnin and vpnout as gateway

Posted: Fri May 14, 2021 11:58 am
by daft_dutch
I gave up setting the gateway in the openvpn config.

i added a up script to the openvpn server.

Code: Select all

#!/bin/sh
ip route add 10.8.0.0/24 dev tun0 table 12
ip route add default via <my vpn client> dev eth0 table 12

ip rule add from 10.8.0.0/24 table 12
ip rule add to 10.8.0.0/24 table 12