Author Topic: Openvpn clients can not connect to advertised networks  (Read 6159 times)

sulazhy

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Openvpn clients can not connect to advertised networks
« Reply #15 on: April 26, 2010, 05:25:34 pm »
Yes, the internal network (10.0.1.0) is advertised, and its uses 255.255.255.0.
Actually, i left the LAB now. but i can paste the routing table tomorrow.
But what exactly could be wrong with it?
Thanks

Saturn2888

  • Zen Hero
  • *****
  • Posts: 707
  • Karma: +1/-0
    • View Profile
Re: Openvpn clients can not connect to advertised networks
« Reply #16 on: April 27, 2010, 06:04:33 am »
You can always try adding this information, formatted for your network, where it would match at the bottom of your openvpn.conf.mas file in /usr/share/ebox/stubs/openvpn/:

<%def advertisedNets>
<%args>
@nets
</%args>
% foreach my $net (@nets) {
%   my ($net, $netmask) = @{ $net  };
   push "route <% $net %> <% $netmask %>"
   push "dhcp-option GATEWAY 1.1.1.1"
   push "dhcp-option DNS 1.1.1.1"
   push "dhcp-option WINS 1.1.1.1"
   push "dhcp-option NBT 2"
   push "dhcp-option DOMAIN octen"
%}
</%def>

Then restart OpenVPN in eBox and then your clients. I don't actually know if the GATEWAY line is correct.
« Last Edit: April 28, 2010, 09:13:50 am by Saturn2888 »

sulazhy

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Openvpn clients can not connect to advertised networks
« Reply #17 on: April 27, 2010, 10:40:24 am »
Saturn,
Thanks very much, But i tried to get to the openvpn.conf.mas file but i couldnt find the share directory in the lib. (/usr/lib/share).

Can you give me a better description on how to go abt this?
Thank you

sulazhy

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Openvpn clients can not connect to advertised networks
« Reply #18 on: April 27, 2010, 03:53:53 pm »
Javier Amor Garcia, Javi and Saturn2888. Pls, I need to attention to my earlier posts.
Thanks

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Openvpn clients can not connect to advertised networks
« Reply #19 on: April 27, 2010, 05:33:49 pm »
If you could get the client's routing  table you could post it there so we could see if something is wrong.

Another problem could that your internal clients could not return the packets to you vpn client. There are two possible solution to this:
a) assure that the eBox server is , and is the only, default gateway
b) you could try to  turn on the Network Address Translation option in the VPN server.

Finally if you want to ty Saturn's suggestion, the file are located at the directory /usr/share/ebox/stubs/openvpn/:

Saturn2888

  • Zen Hero
  • *****
  • Posts: 707
  • Karma: +1/-0
    • View Profile
Re: Openvpn clients can not connect to advertised networks
« Reply #20 on: April 28, 2010, 09:14:20 am »
I'm sorry, I fixed the directory address in my post. Nice catch Javier.

sulazhy

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Openvpn clients can not connect to advertised networks
« Reply #21 on: April 28, 2010, 01:07:55 pm »
Javier,
Here is my client routing table. Please, can you check if everything is alright?


C:\Users\sulazhy>netstat -rn
===========================================================================
Interface List
 19...00 ff 49 bc e7 6b ......TAP-Win32 Adapter V9
 14...00 1a 6b 27 4e 2c ......Bluetooth Device (Personal Area Network)
 12...00 19 b9 84 b2 a3 ......Broadcom NetXtreme 57xx Gigabit Controller
 11...00 13 e8 48 07 59 ......Intel(R) Wireless WiFi Link 4965AGN
  1...........................Software Loopback Interface 1
 17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 15...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
 16...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter
 21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0   192.168.69.254   192.168.69.195     20
         10.0.2.0    255.255.255.0         On-link          10.0.2.2    286
         10.0.2.2  255.255.255.255         On-link          10.0.2.2    286
       10.0.2.255  255.255.255.255         On-link          10.0.2.2    286
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
     192.168.69.0    255.255.255.0         On-link    192.168.69.195    276
   192.168.69.195  255.255.255.255         On-link    192.168.69.195    276
   192.168.69.255  255.255.255.255         On-link    192.168.69.195    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link    192.168.69.195    276
        224.0.0.0        240.0.0.0         On-link          10.0.2.2    286
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link    192.168.69.195    276
  255.255.255.255  255.255.255.255         On-link          10.0.2.2    286
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
 12    276 fe80::/64                On-link
 19    286 fe80::/64                On-link
 21    281 fe80::5efe:192.168.69.195/128
                                    On-link
 12    276 fe80::7493:ec36:8f37:f1ff/128
                                    On-link
 19    286 fe80::f58e:e57f:749a:3668/128
                                    On-link
  1    306 ff00::/8                 On-link
 12    276 ff00::/8                 On-link
 19    286 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None