OpenVPN settings

  • I've been trying to get openVPN up and running so that when I'm at school I can use my laptop to get to my home network


    I installed the openVPN plugin
    created a user and download the certificate to my laptop (config folder of openvpn directory)
    I'm using


    port: 1194
    protocol: udp
    address: 10.8.0.0
    mask: 255.255.255.0
    no default gateway, no client to client
    DNS server: 192.168.1.1
    public ip: external ip of my router


    on my laptop I fire up openvpn, connect using the downloaded config file, but when I go to network in windows I don't see any of my shares listed. Am I missing a step somewhere?


    When I can into the webgui for OMV, I can see that my laptop is connecting to the openvpn service

    • Offizieller Beitrag

    the openvpn plugin only works in tun, no tap(So is not transparent, you won't see them advertised that's what i mean). You should be able to access your shares but by pointing to the ip address of OMV or map as mounted drive.


    Also your address change it to the default original one (which i recall was 172.17.0.0), that's because the plugin has a bug that doesn't change the push directive address. Appears to be fixed now


    Also try in extra options the following directives


    push "route 192.168.1.0 255.255.255.0"

  • 192.168.1.1 is how I access my router. I set this as the DNS server, correct?


    public address is the WAN IP of my router: 24.84.41.xx


    so yes, they are different IPs

  • VPN means Virtual Private Network... basically when you connect to your home network there is a virtual network setup by the openvpn. It is not same network as your lan. Your lan network is 192.168.1.0/24. You cannot use this network in the openvpn plugin. There may be a default virtual network showing in the setup, I'm not sure. But what is entered in the settings cannot be the same as yoru lan. This is what ppfdez was trying to tell you.


    The user that connects to the vpn on the virtual network gets data routed to them from the lan network. Anything that uses broadcasting, like windows my network icon, will not work with/through a routed vpn connection. You need a bridged vpn for this. But you can connect to anything that uses a webpage, like OMV web-gui, by using the local address for your lan.

  • right, so that would be my vpn network which is the default 10.8.0.0 for example


    I've attached a picture of my current settings. I've used a different ip for each of the lan, dns and public addresses


    on my laptop, I have tried to map a network drive by mapping \\NAS\Media but it doesn't work. Have also tried mapping things like \\10.8.0.0\NAS\Media - what's the correct way to do this?

    • Offizieller Beitrag

    Let's assume your NAS ip is 192.168.1.100 in your LAN, then the mounted network drive should be. (10.8.0.0 is the openvpn clients subnet, you should get in your laptop a 10.8.0.6 ip or higher)


    \\192.168.1.100\Media


    Just check the logs of openvpn-gui to check that the routes are being pulled. (remember to run as administrator the openvpn)


    You can check in windows with cmd, type print route

  • so a few questions to help me understand what's going on here (networking is completely foreign to me)


    1. What does that Default Gateway option in the plugin do? i.e. what does it mean for clients to redirect their default network gateway through the vpn?
    2. I have set, in openvpn plugin options, my DNS server to be the internal IP of my router (192.168.1.1). What does it mean to have my router be a DNS server?
    3. Why does it work when I map \\192.168.1.109\Media, but not when I map \\24.84.42.76\Media (public IP), or \\10.8.0.0\Media (VPN network)
    4. Do my clients use the internet connection that it is connected to? Or the internet connection that my NAS/vpn server is connected to? Which bandwidth does it take up?

  • so a few questions to help me understand what's going on here (networking is completely foreign to me)


    1. What does that Default Gateway option in the plugin do? i.e. what does it mean for clients to redirect their default network gateway through the vpn?
    2. I have set, in openvpn plugin options, my DNS server to be the internal IP of my router (192.168.1.1). What does it mean to have my router be a DNS server?
    3. Why does it work when I map \\192.168.1.109\Media, but not when I map \\24.84.42.76\Media (public IP), or \\10.8.0.0\Media (VPN network)
    4. Do my clients use the internet connection that it is connected to? Or the internet connection that my NAS/vpn server is connected to? Which bandwidth does it take up?


    Regarding 1 and 4, if Default Gateway option is checked, all network traffic of the client (including internet) will be routed to the VPN Server (which acts as a gateway), in this case it is preferable to set the DNS Server IP in the OpenVPN options.
    If Default Gateway option is not checked, a route to the private network (i.e. your LAN where you NAS is located), in your case 192.168.1.0/24, is pushed to the client. In this case, only the traffic to that specific network is routed to the VPN Server, the remaining traffic is routed to the default gateway of the client, therefore it should not be needed to set the DNS Server IP in the OpenVPN options.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!