Network setup. Vpnin and vpnout as gateway

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
daft_dutch
OpenVpn Newbie
Posts: 7
Joined: Wed May 05, 2021 3:07 pm

Network setup. Vpnin and vpnout as gateway

Post by daft_dutch » Thu May 13, 2021 2:00 pm

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.

daft_dutch
OpenVpn Newbie
Posts: 7
Joined: Wed May 05, 2021 3:07 pm

Re: Network setup. Vpnin and vpnout as gateway

Post by daft_dutch » Thu May 13, 2021 2:11 pm

Toughti had it running but tests failed

daft_dutch
OpenVpn Newbie
Posts: 7
Joined: Wed May 05, 2021 3:07 pm

Re: Network setup. Vpnin and vpnout as gateway

Post by daft_dutch » Fri May 14, 2021 11:58 am

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

Post Reply