Strage things with Mask

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
HappyAdmin
OpenVpn Newbie
Posts: 2
Joined: Sat Oct 30, 2021 3:46 pm

Strage things with Mask

Post by HappyAdmin » Sat Oct 30, 2021 3:59 pm

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

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Strage things with Mask

Post by TinCanTech » Sat Oct 30, 2021 8:19 pm

See --topology in the manual.

HappyAdmin
OpenVpn Newbie
Posts: 2
Joined: Sat Oct 30, 2021 3:46 pm

Re: Strage things with Mask

Post by HappyAdmin » Sun Oct 31, 2021 7:50 am

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

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Strage things with Mask

Post by openvpn_inc » Fri Nov 05, 2021 11:03 am

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
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply