Когда подключаюсь с ubuntu к vpn серверу, подключение проходит нормально, но интернет трафик идет мимо vpn туннеля по ррр. Подключение с Windows7 проходит успешно и весь трафик заворачивается в туннель. Подозреваю, исходя из логов подключения, что дело в этом
NOTE: unable to redirect default gateway -- Cannot read current default gateway from system.
Гуглил, толком ничего не нашел, скорее всего что-то с маршрутами. Помогите пожалуйста.
Лог подключения:
Thu Aug 1 13:52:28 2013 OpenVPN 2.2.1 i686-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Feb 13 2013
Thu Aug 1 13:52:28 2013 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Thu Aug 1 13:52:28 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Aug 1 13:52:28 2013 LZO compression initialized
Thu Aug 1 13:52:28 2013 Control Channel MTU parms [ L:1546 D:138 EF:38 EB:0 ET:0 EL:0 ]
Thu Aug 1 13:52:28 2013 Socket Buffers: R=[180224->131072] S=[180224->131072]
Thu Aug 1 13:52:28 2013 Data Channel MTU parms [ L:1546 D:1400 EF:46 EB:135 ET:0 EL:0 AF:3/1 ]
Thu Aug 1 13:52:28 2013 Fragmentation MTU parms [ L:1546 D:1400 EF:45 EB:135 ET:1 EL:0 AF:3/1 ]
Thu Aug 1 13:52:28 2013 Local Options hash (VER=V4): 'c086e1aa'
Thu Aug 1 13:52:28 2013 Expected Remote Options hash (VER=V4): '8e7959c7'
Thu Aug 1 13:52:28 2013 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Thu Aug 1 13:52:28 2013 UDPv4 link local: [undef]
Thu Aug 1 13:52:28 2013 UDPv4 link remote: [AF_INET]184.22.255.79:1194
Thu Aug 1 13:52:29 2013 TLS: Initial packet from [AF_INET]184.22.255.79:1194, sid=15d5e135 76882155
Thu Aug 1 13:52:29 2013 VERIFY OK: depth=1, /C=US/ST=CA/L=LosAngeles/O=yoyo/OU=web/CN=serv/name=Kulig/emailAddress=mail@serv.com
Thu Aug 1 13:52:29 2013 VERIFY OK: depth=0, /C=US/ST=CA/L=LosAngeles/O=yoyo/OU=web/CN=serv/name=Kulig/emailAddress=mail@serv.com
Thu Aug 1 13:52:31 2013 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Aug 1 13:52:31 2013 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Aug 1 13:52:31 2013 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Aug 1 13:52:31 2013 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Aug 1 13:52:31 2013 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Thu Aug 1 13:52:31 2013 [serv] Peer Connection Initiated with [AF_INET]184.22.255.79:1194
Thu Aug 1 13:52:33 2013 SENT CONTROL [serv]: 'PUSH_REQUEST' (status=1)
Thu Aug 1 13:52:34 2013 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 10.8.0.1,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Thu Aug 1 13:52:34 2013 OPTIONS IMPORT: timers and/or timeouts modified
Thu Aug 1 13:52:34 2013 OPTIONS IMPORT: --ifconfig/up options modified
Thu Aug 1 13:52:34 2013 OPTIONS IMPORT: route options modified
Thu Aug 1 13:52:34 2013 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Thu Aug 1 13:52:34 2013 ROUTE: default_gateway=UNDEF
Thu Aug 1 13:52:34 2013 TUN/TAP device tun0 opened
Thu Aug 1 13:52:34 2013 TUN/TAP TX queue length set to 100
Thu Aug 1 13:52:34 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu Aug 1 13:52:34 2013 /sbin/ifconfig tun0 10.8.0.6 pointopoint 10.8.0.5 mtu 1500
Thu Aug 1 13:52:34 2013 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system
Thu Aug 1 13:52:34 2013 /sbin/route add -net 10.8.0.1 netmask 255.255.255.255 gw 10.8.0.5
Thu Aug 1 13:52:34 2013 GID set to nogroup
Thu Aug 1 13:52:34 2013 UID set to nobody
Thu Aug 1 13:52:34 2013 Initialization Sequence Completed
Конфиг клиента:
client
remote 184.22.255.79 1194
dev tun
proto udp
resolv-retry infinite # this is necessary for DynDNS
nobind
user nobody
group nogroup
persist-key
persist-tun
#route-method exe
#route-delay 2
tun-mtu 1500
fragment 1400
mssfix 1400
ca ca.crt
key cli1.key
cert cli1.crt
comp-lzo
verb 3
mute 20
Конфиг сервера:
local 184.22.255.79
port 1194
proto udp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
tun-mtu 1500
fragment 1400
mssfix 1400
push "dhcp-option DNS 10.8.0.1"
keepalive 10 120
comp-lzo
max-clients 10
user nobody
group nobody
persist-key
persist-tun
status /etc/openvpn/openvpn-status.log
log /etc/openvpn/openvpn.log
verb 3
mute 20
route до подключения к vpn:
Таблица маршутизации ядра протокола IP
Destination Gateway Genmask Flags Metric Ref Use Iface
default * 0.0.0.0 U 0 0 0 ppp0
10.128.0.2 * 255.255.255.255 UH 0 0 0 ppp0
10.192.0.0 10.212.142.1 255.192.0.0 UG 0 0 0 eth0
10.212.142.0 * 255.255.255.0 U 1 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 ppp0
192.168.4.0 10.212.142.1 255.255.255.0 UG 0 0 0 eth0
192.168.10.0 10.212.142.1 255.255.255.0 UG 0 0 0 eth0
192.168.10.6 10.212.142.1 255.255.255.255 UGH 0 0 0 eth0
192.168.10.6 10.212.142.1 255.255.255.255 UGH 0 0 0 eth0
192.168.254.0 10.212.142.1 255.255.255.0 UG 0 0 0 eth0
route после подключения к vpn:
Таблица маршутизации ядра протокола IP
Destination Gateway Genmask Flags Metric Ref Use Iface
default * 0.0.0.0 U 0 0 0 ppp0
10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0
10.8.0.5 * 255.255.255.255 UH 0 0 0 tun0
10.128.0.2 * 255.255.255.255 UH 0 0 0 ppp0
10.192.0.0 10.212.142.1 255.192.0.0 UG 0 0 0 eth0
10.212.142.0 * 255.255.255.0 U 1 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 ppp0
192.168.4.0 10.212.142.1 255.255.255.0 UG 0 0 0 eth0
192.168.10.0 10.212.142.1 255.255.255.0 UG 0 0 0 eth0
192.168.10.6 10.212.142.1 255.255.255.255 UGH 0 0 0 eth0
192.168.10.6 10.212.142.1 255.255.255.255 UGH 0 0 0 eth0
192.168.254.0 10.212.142.1 255.255.255.0 UG 0 0 0 eth0
ifconfig:
eth0 Link encap:Ethernet HWaddr 8c:89:a5:60:95:1e
inet addr:10.212.142.51 Bcast:10.212.142.255 Mask:255.255.255.0
inet6 addr: fe80::8e89:a5ff:fe60:951e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17188 errors:0 dropped:0 overruns:0 frame:0
TX packets:16911 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9395818 (9.3 MB) TX bytes:3269627 (3.2 MB)
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4180 errors:0 dropped:0 overruns:0 frame:0
TX packets:4180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:417108 (417.1 KB) TX bytes:417108 (417.1 KB)
ppp0 Link encap:Протокол PPP (Point-to-Point Protocol)
inet addr:93.171.113.96 P-t-P:10.128.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:1459 errors:0 dropped:0 overruns:0 frame:0
TX packets:1778 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:445126 (445.1 KB) TX bytes:284865 (284.8 KB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.6 P-t-P:10.8.0.5 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)