OpenVPN - L3 - Maska

Petr Haresta haresta na gmail.com
Úterý Listopad 15 15:20:52 CET 2011


Dobrý den,

ten push tam mám kvůli tomu že OpenVpn (10.10.11.X) mám v jiném rozsahu než
vnitřní síť (10.10.10.X). Takže tohle mou situaci neřeší...

Něco málo je o tom napsáno i na oficiálních stránkách openvpn, ale moudrý z
toho nejsem:
http://openvpn.net/index.php/open-source/documentation/install.html?start=1


--
Notes -- TUN devices

Tun device support (via the --dev tun option) was first included in OpenVPN
1.5-beta8.

A "tun" device is a virtual point-to-point IP link.

Using --dev tun also requires that you use --ifconfig to tell OpenVPN the
local and remote IP endpoints for the point-to-point tunnel.

The --ifconfig option also calls the Windows "netsh" command, and some
problems have been reported with this command on Win2K at lower service
packet levels.

If you would like to use --dev tun but would rather set the TCP/IP
properties manually rather than having OpenVPN try to do it automatically
with netsh, follow these steps:

    Specify --ifconfig with endpoint addresses.
    Specify the --ifconfig-noexec option.
    Manually set the network/subnet in the TCP/IP properties. You should use
a "/30" subnet that encloses the addresses that were specified in the
--ifconfig option. The netmask, therefore, will be 255.255.255.252.

-----Original Message-----
From: linux-bounces na linux.cz [mailto:linux-bounces na linux.cz] On Behalf Of
Marian Cavojsky
Sent: Tuesday, November 15, 2011 2:24 PM
To: Diskuse o Linuxu v cestine
Subject: Re: OpenVPN - L3 - Maska

On Tue, Nov 15, 2011 at 02:04:20PM +0100, Petr Haresta wrote:
> Dobrý den,
>
>
>
> rozchodil jsem openvpn L3 (tun). Problém je následující:
>
>
>
> -       Pokud-li klientovi z windows chci přidělit nějakou vyšší IP adresu
> (ifconfig-push 10.10.11.52 10.10.11.1) VPN se nespojí. V logu klienta:
>
> Tue Nov 15 13:58:49 2011 There is a problem in your selection of
--ifconfig
> endpoints [local=10.10.11.52, remote=10.10.11.1].  The local and remote
VPN
> endpoints must exist within the same 255.255.255.252 subnet.  This is a
> limitation of --dev tun when used with the TAP-WIN32 driver.  Try 'openvpn
> --show-valid-subnets' option for more info.
>
> -       Z klienta v linuxu bez problému.
>
> -       Upravím-li (-push 10.10.11.2 10.10.11.1) spojím se z Windows bez
> problému
>
> -       Všiml jsem si, že tun ve windows dostane masku 255.255.255.252,
což
> je pak jasné, proč se to nespojí.
>
> -       Proč to dělá? Nikde jsem pomocí google nenašel řešení. Mám špatně
> nějaký parametr?

Neviem čo je zle nastavené, ale mne dáva tiež masku x.x.x.252, ale
remote je o jedna menší ako local adresa. Pričom lokálna adresa je
párna, takže to všetko funguje ako má.

inet 192.168.187.6 peer 192.168.187.5

Nesnažíte sa ho presvedčiť, že vzdialená adresa je iná ako má byť? Linux
klient sa z toho asi spamätá, ale win nie.

>
> Server.conf
>
> ------------------
>
> mode server
>
> tls-server
>
> port 1194
>
> proto udp
>
> dev tun0

tu mam len:
dev tun

> ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
>
> cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
>
> key /etc/openvpn/easy-rsa/2.0/keys/server.key  # This file should be kept
> secret
>
> dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
>
> #ifconfig-pool 10.10.11.50 10.10.11.60
>
> server 10.10.11.0 255.255.255.0
>
> push "route 10.10.10.0 255.255.255.0"

push nepoužívam vôbec, ale nie je tam problém s iným rozsahom ako je v
maske pre server?

> keepalive 10 120
>
> log-append /var/log/openvpn.log
>
> comp-lzo
>
> client-config-dir ccd

--
Marián Čavojský
_______________________________________________
Linux mailing list
Linux na linux.cz
http://www.linux.cz/mailman/listinfo/linux




Další informace o konferenci Linux