Page 1 of 1

Strage things with Mask

Posted: Sat Oct 30, 2021 3:59 pm
by HappyAdmin
I have created a VPN server on Hyper V-Machine with two virtual adapters standard internal (IP: 192.168.137.10 )and OpenVPNWintun adapter
in my config file I have written a 8.0.0.0 subnet with mask 255.255.255.0 for vpn net

mine config file is like this:

Code: Select all

;local 192.168.137.10
port 1194
proto tcp-server
dev tun
tun-mtu 1300;
ca   "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\issued\\srvHostel.crt"
key  "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\private\\srvHostel.key"
   dh  "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\dh.pem"  
tls-auth "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ta.key" 0   # This file is secret

server 8.0.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt

push "route 8.0.0.0 255.255.255.0"
push "route 192.168.137.0 255.255.255.0"

push "dhcp-option DNS 192.168.137.1"
;push "dhcp-option DNS 208.67.220.220"

keepalive 10 120
cipher AES-256-GCM
persist-key
persist-tun
status "C:\\Program Files\\OpenVPN\\log\\status.log"
log  "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 4
mute 20

# WINTUN 
windows-driver wintun
first question is
my wintun vpn adapter recieves a 255.255.255.252 mask I don't understand why, since in my serer config file I have written server 8.0.0.0 255.255.255.0 ??????

second question how to do best my subnet 192.168.137.0 visible from VPN clients i have written: push "route 8.0.0.0 255.255.255.0"
push "route 192.168.137.0 255.255.255.0" but cannont access server for example 192.168.137.5

Re: Strage things with Mask

Posted: Sat Oct 30, 2021 8:19 pm
by TinCanTech
See --topology in the manual.

Re: Strage things with Mask

Posted: Sun Oct 31, 2021 7:50 am
by HappyAdmin
TinCanTech wrote:
Sat Oct 30, 2021 8:19 pm
See --topology in the manual.
Thank you, can you please provide a link to this topology, i am not that good with english unfortunatly could not find it. Thank you

Re: Strage things with Mask

Posted: Fri Nov 05, 2021 11:03 am
by openvpn_inc
Hello HappyAdmin,

You can look here for the reference manual of OpenVPN 2.5 which has probably the best explanation of all available OpenVPN config options. The topology directive determines how the networking is set up between server and client.

https://build.openvpn.net/man/openvpn-2 ... vpn.8.html

From the looks of it, it seems like you're looking for the subnet topology option.

Kind regards,
Johan