network access behind OPENVPN server

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.
Chris93100
OpenVpn Newbie
Posts: 11
Joined: Fri May 01, 2020 11:44 am

Re: network access behind OPENVPN server

Post by Chris93100 » Thu May 07, 2020 5:33 pm

My server config :

Code: Select all

#################################################
# Sample OpenVPN 2.0 config file for            #
 
port 1199
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\.crt"
key "C:\\Program Files\\OpenVPN\\config\\.key" # This file should be kept secret
dh "C:\\Program Files\\OpenVPN\\config\\dh2048.pem"
topology subnet
server 10.8.0.0 255.255.255.0
route 192.168.5.0 255.255.255.0
route 192.168.1.0 255.255.255.0
; ifconfig-pool-persist ipp.txt
client-config-dir "C:\\Program Files\\OpenVPN\\config\\ccd"
push "route 192.168.5.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
client-to-client
keepalive 10 120
tls-auth  "C:\\Program Files\\OpenVPN\\config\\ta.key" 0 # This file is secret
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
and client config (server adress is masked)

Code: Select all

client
dev tun
ver.
;proto tcp
proto udp
remote s1.XXXXXXXX.pro 1199
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client2.crt
key client2.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
verb 3
and options ccd for two clients
client1

Code: Select all

ifconfig-push 10.8.0.5 255.255.255.0
iroute 192.168.5.0 255.255.255.0
client2

Code: Select all

ifconfig-push 10.8.0.9 255.255.255.0

Chris93100
OpenVpn Newbie
Posts: 11
Joined: Fri May 01, 2020 11:44 am

Re: network access behind OPENVPN server

Post by Chris93100 » Thu May 07, 2020 6:21 pm

on client1 it's windows 8.
Can i add a route on client1 to go to PC on 192.162.1.0 sub network for example NAS 192.162.1.147 (on this one, i have added a road 10.8.0.0/255 with gateway 192.168.1.150 (Ip of Client1) ? 192.162.1.0 exists in route print

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: network access behind OPENVPN server

Post by 300000 » Thu May 07, 2020 7:41 pm

You need to do ip routing the same your openserver on client.

Post Reply