Hello,
So after few days of hard working, I am asking some help. I was able to run VPN Server on my own PC (Win7). And everything worked. So, I decided to run a OpenVPN server on VPS (Ubuntu 12.04): [TAP Enabled, udp 1194 port opened]
Server.conf
port 1194
proto udp
dev tun
server 10.0.0.0 255.255.255.0 #you may choose any subnet. 10.0.0.x is used for this example.
user nobody
group nogroup
ca "//etc//openvpn//ca.crt"
cert "//etc//openvpn//server.crt"
key "//etc//openvpn//server.key"
dh "//etc//openvpn//dh1024.pem"
#client-to-client
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
#push "redirect-gateway def1 bypass-dhcp"
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
Client:
client
dev tun
proto udp
remote 84.200.17.42 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3
explicit-exit-notify 2
ping 10
ping-restart 60
route-method exe
route-delay 2
These configs worked on Win7 Server <-> XP SP3 User connection/
Server log:
root@server1:~# sudo openvpn --config /etc/openvpn/server.conf
Sat Jul 6 11:38:17 2013 OpenVPN 2.2.1 i686-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 30 2012
Sat Jul 6 11:38:17 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sat Jul 6 11:38:17 2013 Diffie-Hellman initialized with 1024 bit key
Sat Jul 6 11:38:17 2013 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Sat Jul 6 11:38:17 2013 Socket Buffers: R=[163840->131072] S=[163840->131072]
Sat Jul 6 11:38:17 2013 ROUTE default_gateway=84.200.17.1
Sat Jul 6 11:38:17 2013 TUN/TAP device tun0 opened
Sat Jul 6 11:38:17 2013 TUN/TAP TX queue length set to 100
Sat Jul 6 11:38:17 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Jul 6 11:38:17 2013 /sbin/ifconfig tun0 10.0.0.1 pointopoint 10.0.0.2 mtu 1500
Sat Jul 6 11:38:17 2013 /sbin/route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.2
Sat Jul 6 11:38:17 2013 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Sat Jul 6 11:38:17 2013 GID set to nogroup
Sat Jul 6 11:38:17 2013 UID set to nobody
Sat Jul 6 11:38:17 2013 UDPv4 link local (bound): [undef]
Sat Jul 6 11:38:17 2013 UDPv4 link remote: [undef]
Sat Jul 6 11:38:17 2013 MULTI: multi_init called, r=256 v=256
Sat Jul 6 11:38:17 2013 IFCONFIG POOL: base=10.0.0.4 size=62, ipv6=0
Sat Jul 6 11:38:17 2013 Initialization Sequence Completed
Client log:
Sat Jul 06 14:39:04 2013 OpenVPN 2.3.2 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [eurephia] [IPv6] built on Jun 3 2013
Sat Jul 06 14:39:04 2013 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Sat Jul 06 14:39:04 2013 Need hold release from management interface, waiting...
Sat Jul 06 14:39:04 2013 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Sat Jul 06 14:39:05 2013 MANAGEMENT: CMD 'state on'
Sat Jul 06 14:39:05 2013 MANAGEMENT: CMD 'log all on'
Sat Jul 06 14:39:05 2013 MANAGEMENT: CMD 'hold off'
Sat Jul 06 14:39:05 2013 MANAGEMENT: CMD 'hold release'
Sat Jul 06 14:39:05 2013 Socket Buffers: R=[8192->8192] S=[8192->8192]
Sat Jul 06 14:39:05 2013 UDPv4 link local: [undef]
Sat Jul 06 14:39:05 2013 UDPv4 link remote: [AF_INET]84.200.17.42:1194
Sat Jul 06 14:39:05 2013 MANAGEMENT: >STATE:1373110745,WAIT,,,
Sat Jul 06 14:39:05 2013 MANAGEMENT: >STATE:1373110745,AUTH,,,
Sat Jul 06 14:39:05 2013 TLS: Initial packet from [AF_INET]84.200.17.42:1194, sid=2945c7cb e33e5bf3
Sat Jul 06 14:39:05 2013 VERIFY OK: depth=1, C=DE, ST=DE, L=Frankfurt, O=Our, OU=Kaz, CN=Server, name=Kaz, emailAddress=mail@host.domain
Sat Jul 06 14:39:05 2013 VERIFY OK: nsCertType=SERVER
Sat Jul 06 14:39:05 2013 VERIFY OK: depth=0, C=DE, ST=DE, L=Frankfurt, O=Our, OU=Kaz, CN=server, name=Kaz, emailAddress=mail@host.domain
Sat Jul 06 14:39:06 2013 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Sat Jul 06 14:39:06 2013 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Jul 06 14:39:06 2013 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Sat Jul 06 14:39:06 2013 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Jul 06 14:39:06 2013 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Sat Jul 06 14:39:06 2013 [server] Peer Connection Initiated with [AF_INET]84.200.17.42:1194
Sat Jul 06 14:39:07 2013 MANAGEMENT: >STATE:1373110747,GET_CONFIG,,,
Sat Jul 06 14:39:08 2013 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Sat Jul 06 14:39:08 2013 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 8.8.8.8,route 10.0.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.0.0.6 10.0.0.5'
Sat Jul 06 14:39:08 2013 OPTIONS IMPORT: timers and/or timeouts modified
Sat Jul 06 14:39:08 2013 OPTIONS IMPORT: --ifconfig/up options modified
Sat Jul 06 14:39:08 2013 OPTIONS IMPORT: route options modified
Sat Jul 06 14:39:08 2013 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Jul 06 14:39:09 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Jul 06 14:39:09 2013 MANAGEMENT: >STATE:1373110749,ASSIGN_IP,,10.0.0.6,
Sat Jul 06 14:39:09 2013 open_tun, tt->ipv6=0
Sat Jul 06 14:39:09 2013 TAP-WIN32 device [Local Area Connection 2] opened: \\.\Global\{331996EA-71E3-4BF2-8A42-1FE2E11BAD8A}.tap
Sat Jul 06 14:39:09 2013 TAP-Windows Driver Version 9.9
Sat Jul 06 14:39:09 2013 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.0.0.6/255.255.255.252 on interface {331996EA-71E3-4BF2-8A42-1FE2E11BAD8A} [DHCP-serv: 10.0.0.5, lease-time: 31536000]
Sat Jul 06 14:39:09 2013 Successful ARP Flush on interface [22] {331996EA-71E3-4BF2-8A42-1FE2E11BAD8A}
Sat Jul 06 14:39:11 2013 TEST ROUTES: 2/2 succeeded len=1 ret=1 a=0 u/d=up
Sat Jul 06 14:39:11 2013 C:\Windows\system32\route.exe ADD 84.200.17.42 MASK 255.255.255.255 78.58.127.254
Sat Jul 06 14:39:11 2013 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sat Jul 06 14:39:11 2013 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.0.0.5
Sat Jul 06 14:39:11 2013 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sat Jul 06 14:39:11 2013 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.0.0.5
Sat Jul 06 14:39:11 2013 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sat Jul 06 14:39:11 2013 MANAGEMENT: >STATE:1373110751,ADD_ROUTES,,,
Sat Jul 06 14:39:11 2013 C:\Windows\system32\route.exe ADD 10.0.0.1 MASK 255.255.255.255 10.0.0.5
Sat Jul 06 14:39:11 2013 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sat Jul 06 14:39:12 2013 Initialization Sequence Completed
Sat Jul 06 14:39:12 2013 MANAGEMENT: >STATE:1373110752,CONNECTED,SUCCESS,10.0.0.6,84.200.17.42
I can ping server ip from computer which is connected to vpn: Reply from 84.200.17.42: bytes=32 time=71ms TTL=58
I can ping 10.0.0.1 and so on.
But there are no internet connection, I can't load pages. I can ping pages from VPN Server (as example: 64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_req=1 ttl=51 time=2.77 ms)
Do you have any ideas where could be a problem? Thank you for your help.