Routing trough OpenVPN and Networks behind clients

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
Pfiff
OpenVpn Newbie
Posts: 2
Joined: Wed Nov 07, 2018 9:19 am

Routing trough OpenVPN and Networks behind clients

Post by Pfiff » Wed Nov 07, 2018 9:42 am

Dear OpenVPN Community,

I want to connect multiple clients and multiple networks through OpenVPN.
Like this:
Image

Now my OpenVPN Server (Show in the right upper corner) is working and all OpenVPN Clients are able to connect the OpenVPN Server.
All Clients are also abtel to ping each other through OpenVPN network.

So far so good.

Now I want to access the 192.168.69.12 (Icinga2 Server) from my Mobile Client (Show down in the middle).
This is not possible. I've tried many setup variants without success.

Maybe you are able to help me.

OpenVPN Server config file:

Code: Select all

mode server
client-config-dir /etc/openvpn/d****l/client-configs
ca /etc/openvpn/d*****l/easyrsa/pki/ca.crt
cert /etc/openvpn/d*****l/easyrsa/pki/issued/s*****.crt
key /etc/openvpn/d*****l/easyrsa/pki/private/s*****.key
dh /etc/openvpn/d*****l/easyrsa/pki/dh.pem
crl-verify /etc/openvpn/d*****l/easyrsa/pki/crl.pem
proto tcp-server
port 1194
tls-server
#comp-lzo
group nogroup
user nobody
status /var/log/openvpn/d*****l-status.log
verb 3
dev tun0
local 37.**.***.35
server 10.255.255.0 255.255.255.0
keepalive 10 120
topology subnet
cipher AES-256-CBC
plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so login
auth SHA1

client-to-client
topology subnet

route 192.168.69.0 255.255.255.0 10.255.255.101


# Additional custom options
tls-version-min 1.2
#auth SHA512
OpenVPN Server route:

Code: Select all

default via 37.**.**.46 dev ens18 onlink 
10.255.255.0/24 dev tun0 proto kernel scope link src 10.255.255.1 
37.**.***.32/28 dev ens18 proto kernel scope link src 37.**.***.35 
192.168.69.0/24 via 10.255.255.101 dev tun0 
IP Forward on OpenVPN Server

Code: Select all

cat /proc/sys/net/ipv4/ip_forward
1

Example Client Config (Laptop01:

Code: Select all

ifconfig-push 10.255.255.201 255.255.255.0
#push "route 192.168.69.0 255.255.255.0 10.255.255.101"
Example Client Config (Main Office):

Code: Select all

ifconfig-push 10.255.255.101 255.255.255.0
#push "route 10.0.0.0 255.0.0.0"

Thank you very mutch

David

Pfiff
OpenVpn Newbie
Posts: 2
Joined: Wed Nov 07, 2018 9:19 am

Re: Routing trough OpenVPN and Networks behind clients

Post by Pfiff » Mon Feb 11, 2019 11:26 pm

After hours of testing, my head is smoldering like an old chimney...

Unfortunately, the problem is still not solved...

Any ideas?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5871
Joined: Fri Jun 03, 2016 1:17 pm

Re: Routing trough OpenVPN and Networks behind clients

Post by TinCanTech » Tue Feb 12, 2019 2:27 pm

As you have not configured any --iroutes I presume you have not read the Openvpn Howto.

Post Reply