Page 2 of 2

Re: network access behind OPENVPN server

Posted: Thu May 07, 2020 5:33 pm
by Chris93100
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

Re: network access behind OPENVPN server

Posted: Thu May 07, 2020 6:21 pm
by Chris93100
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

Re: network access behind OPENVPN server

Posted: Thu May 07, 2020 7:41 pm
by 300000
You need to do ip routing the same your openserver on client.