Hello!
After reading for hours the posts of this forum i need still help with my setup.
The VPN Conection wents fine and my openwrt router (VPNIP 10.8.0.6) can ping the VPS (VPNIP 10.8.0.1).
Ping from Laptop to 10.8.0.6 are replyed, but Laptop to 10.8.0.1 arent.
Ping from openwrt to 10.8.0.1 are replyed, but openwrt to google.com arent. (Hostnames solved correct.)
My VPS Provider is Hostingparadise.de Virtualization tech is OpenVZ (yes i know allways, allways, allway use xen 😉 but hey, this one is 30 day free )
The specs are 1024mb of ram/ 25gb of harddisk / xeon Procc. ubuntu 11 minimal is running on it.
Here a small sheme how stuff is connected (all LAN Ips, not VPN)
___Laptop_____> ___Openwrt___> ____Fritz!Box_____>____Internet____>_____VPS Server
10.66.0.241______10.66.77.1_______100.100.100.15___________________jupi.luppi.schuppi.wuppie:1194
At a later point i decide to carry this Openwrt router arround. Annywhere i connect it to the internet it have to use
the VPN as a default gateway. So when any Laptop / ipad / iphone / ARdrone or my vacuum cleaner connects to
that Openwrt router it uses the vpn gateway by default.
Cheers
derdigge
Serverconfig:
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt #notsure what it does or if i need it
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8" #maybe there are better ones
push "dhcp-option DNS 8.8.4.4" #maybe there are better ones
keepalive 10 120
comp-lzo
max-clients 3
persist-key #notsure what it does or if i need it
persist-tun #notsure what it does or if i need it
status openvpn-status.log
verb 3
Serverlog:
root@v110814053552124:/etc/openvpn# openvpn server.conf
Tue Aug 16 13:35:21 2011 OpenVPN 2.1.3 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] buil
t on Mar 11 2011
Tue Aug 16 13:35:21 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or exec
utables
Tue Aug 16 13:35:21 2011 Diffie-Hellman initialized with 1024 bit key
Tue Aug 16 13:35:21 2011 /usr/bin/openssl-vulnkey -q -b 1024 -m <modulus omitted>
Tue Aug 16 13:35:21 2011 TLS-Auth MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Tue Aug 16 13:35:21 2011 Socket Buffers: R=[87380->131072] S=[16384->131072]
Tue Aug 16 13:35:21 2011 ROUTE: default_gateway=UNDEF
Tue Aug 16 13:35:21 2011 TUN/TAP device tun0 opened
Tue Aug 16 13:35:21 2011 TUN/TAP TX queue length set to 100
Tue Aug 16 13:35:21 2011 /sbin/ifconfig tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Tue Aug 16 13:35:21 2011 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Tue Aug 16 13:35:21 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Aug 16 13:35:21 2011 Listening for incoming TCP connection on [undef]
Tue Aug 16 13:35:21 2011 TCPv4_SERVER link local (bound): [undef]
Tue Aug 16 13:35:21 2011 TCPv4_SERVER link remote: [undef]
Tue Aug 16 13:35:21 2011 MULTI: multi_init called, r=256 v=256
Tue Aug 16 13:35:21 2011 IFCONFIG POOL: base=10.8.0.4 size=62
Tue Aug 16 13:35:21 2011 IFCONFIG POOL LIST
Tue Aug 16 13:35:21 2011 MULTI: TCP INIT maxclients=3 maxevents=7
Tue Aug 16 13:35:21 2011 Initialization Sequence Completed
Tue Aug 16 13:38:00 2011 MULTI: multi_create_instance called
Tue Aug 16 13:38:00 2011 Re-using SSL/TLS context
Tue Aug 16 13:38:00 2011 LZO compression initialized
Tue Aug 16 13:38:00 2011 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Tue Aug 16 13:38:00 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Aug 16 13:38:00 2011 Local Options hash (VER=V4): 'c0103fa8'
Tue Aug 16 13:38:00 2011 Expected Remote Options hash (VER=V4): '69109d17'
Tue Aug 16 13:38:00 2011 TCP connection established with [AF_INET]92.76.116.52:46908
Tue Aug 16 13:38:00 2011 TCPv4_SERVER link local: [undef]
Tue Aug 16 13:38:00 2011 TCPv4_SERVER link remote: [AF_INET]92.76.116.52:46908
Tue Aug 16 13:38:01 2011 92.76.116.52:46908 TLS: Initial packet from [AF_INET]92.76.116.52:46908, sid=b0d3c168 efd81070
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 VERIFY OK: depth=1, /C=DE/ST=SA/L=Magdeburg/O=Broitzem/CN=openvpn-ca/emailAd
dress=stephan.oelze@googlemail.com
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 VERIFY OK: depth=0, /C=DE/ST=SA/L=Magdeburg/O=Broitzem/CN=client1/emailAddre
ss=stephan.oelze@googlemail.com
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authenticat
ion
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authenticat
ion
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Tue Aug 16 13:38:02 2011 92.76.116.52:46908 [client1] Peer Connection Initiated with [AF_INET]92.76.116.52:46908
Tue Aug 16 13:38:02 2011 client1/92.76.116.52:46908 MULTI: Learn: 10.8.0.6 -> client1/92.76.116.52:46908
Tue Aug 16 13:38:02 2011 client1/92.76.116.52:46908 MULTI: primary virtual IP for client1/92.76.116.52:46908: 10.8.0.6
Tue Aug 16 13:38:04 2011 client1/92.76.116.52:46908 PUSH: Received control message: 'PUSH_REQUEST'
Tue Aug 16 13:38:04 2011 client1/92.76.116.52:46908 SENT CONTROL [client1]: 'PUSH_REPLY,redirect-gateway def1 bypass-dhc
p,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0
.6 10.8.0.5' (status=1)
Tue Aug 16 13:45:16 2011 client1/92.76.116.52:46908 Connection reset, restarting [0]
Tue Aug 16 13:45:16 2011 client1/92.76.116.52:46908 SIGUSR1[soft,connection-reset] received, client-instance restarting
Tue Aug 16 13:45:16 2011 TCP/UDP: Closing socket
Tue Aug 16 14:22:20 2011 TCP/UDP: Closing socket
Tue Aug 16 14:22:20 2011 /sbin/route del -net 10.8.0.0 netmask 255.255.255.0
Tue Aug 16 14:22:20 2011 Closing TUN/TAP interface
Tue Aug 16 14:22:20 2011 /sbin/ifconfig tun0 0.0.0.0
Tue Aug 16 14:22:20 2011 SIGINT[hard,] received, process exiting
Clientconfig:
client
dev tun
proto tcp
remote jupi.luppi.schuppi.wuppie 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/client1.crt
key /etc/openvpn/client1.key
ns-cert-type server
comp-lzo
verb 3
Clientlog:
root@OpenWrt:/etc/openvpn# openvpn client.conf
Tue Aug 16 11:35:55 2011 OpenVPN 2.1.4 mips-openwrt-linux [SSL] [LZO2] [EPOLL] built on Aug 12 2011
Tue Aug 16 11:35:55 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Aug 16 11:35:55 2011 WARNING: file '/etc/openvpn/client1.key' is group or others accessible
Tue Aug 16 11:35:55 2011 LZO compression initialized
Tue Aug 16 11:35:55 2011 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Tue Aug 16 11:35:55 2011 Socket Buffers: R=[87380->131072] S=[16384->131072]
Tue Aug 16 11:35:55 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Aug 16 11:35:55 2011 Attempting to establish TCP connection with jupi.luppi.schuppi.wuppie:1194 [nonblock]
Tue Aug 16 11:35:56 2011 TCP connection established with jupi.luppi.schuppi.wuppie:1194
Tue Aug 16 11:35:56 2011 TCPv4_CLIENT link local: [undef]
Tue Aug 16 11:35:56 2011 TCPv4_CLIENT link remote: jupi.luppi.schuppi.wuppie:1194
Tue Aug 16 11:35:56 2011 TLS: Initial packet from jupi.luppi.schuppi.wuppie:1194, sid=ff346af4 bf689510
Tue Aug 16 11:35:57 2011 VERIFY OK: depth=1, /C=DE/ST=SA/L=Magdeburg/O=Broitzem/CN=openvpn-ca/emailAddress=Freak@cage.com
Tue Aug 16 11:35:57 2011 VERIFY OK: nsCertType=SERVER
Tue Aug 16 11:35:57 2011 VERIFY OK: depth=0, /C=DE/ST=SA/L=Magdeburg/O=Broitzem/CN=server/emailAddress=Freak@cage.com
Tue Aug 16 11:35:58 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Aug 16 11:35:58 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Aug 16 11:35:58 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Aug 16 11:35:58 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Aug 16 11:35:58 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Tue Aug 16 11:35:58 2011 [server] Peer Connection Initiated with jupi.luppi.schuppi.wuppie:1194
Tue Aug 16 11:36:00 2011 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Tue Aug 16 11:36:00 2011 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Tue Aug 16 11:36:00 2011 OPTIONS IMPORT: timers and/or timeouts modified
Tue Aug 16 11:36:00 2011 OPTIONS IMPORT: --ifconfig/up options modified
Tue Aug 16 11:36:00 2011 OPTIONS IMPORT: route options modified
Tue Aug 16 11:36:00 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Tue Aug 16 11:36:00 2011 TUN/TAP device tun0 opened
Tue Aug 16 11:36:00 2011 TUN/TAP TX queue length set to 100
Tue Aug 16 11:36:00 2011 /sbin/ifconfig tun0 10.8.0.6 pointopoint 10.8.0.5 mtu 1500
Tue Aug 16 11:36:00 2011 /sbin/route add -net jupi.luppi.schuppi.wuppie netmask 255.255.255.255 gw 100.100.100.15
Tue Aug 16 11:36:00 2011 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.8.0.5
Tue Aug 16 11:36:00 2011 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.8.0.5
Tue Aug 16 11:36:00 2011 /sbin/route add -net 10.8.0.1 netmask 255.255.255.255 gw 10.8.0.5
Tue Aug 16 11:36:00 2011 Initialization Sequence Completed
Clients Ifconfig
root@OpenWrt:~# ifconfig
br-lan Link encap:Ethernet HWaddr 00:18:E7:89:8D:3B
inet addr:10.66.77.1 Bcast:10.66.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35876 errors:0 dropped:1825 overruns:0 frame:0
TX packets:34420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4964810 (4.7 MiB) TX bytes:10067055 (9.6 MiB)
eth0 Link encap:Ethernet HWaddr 00:18:E7:89:8D:3B
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:221109 errors:0 dropped:11 overruns:12 frame:0
TX packets:171562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:99883882 (95.2 MiB) TX bytes:87316214 (83.2 MiB)
Interrupt:4
eth0.1 Link encap:Ethernet HWaddr 00:18:E7:89:8D:3B
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:221026 errors:0 dropped:4 overruns:0 frame:0
TX packets:171553 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:96777514 (92.2 MiB) TX bytes:86628210 (82.6 MiB)
eth1 Link encap:Ethernet HWaddr 00:18:E7:89:8D:3C
inet addr:100.100.100.20 Bcast:100.101.255.255 Mask:255.254.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110513 errors:0 dropped:741 overruns:0 frame:0
TX packets:109091 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45865991 (43.7 MiB) TX bytes:12708947 (12.1 MiB)
Interrupt:5
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11402 (11.1 KiB) TX bytes:11402 (11.1 KiB)
mon.wlan0 Link encap:UNSPEC HWaddr 00-18-E7-89-8D-39-00-47-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:145509 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27850469 (26.5 MiB) TX bytes:0 (0.0 B)
mon.wlan1 Link encap:UNSPEC HWaddr 00-18-E7-89-8D-3A-00-47-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:75 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6258 (6.1 KiB) TX bytes:0 (0.0 B)
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:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:173 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1008 (1008.0 B) TX bytes:14459 (14.1 KiB)
wlan0 Link encap:Ethernet HWaddr 00:18:E7:89:8D:39
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4391 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1138784 (1.0 MiB)
wlan1 Link encap:Ethernet HWaddr 00:18:E7:89:8D:3A
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:771 errors:0 dropped:0 overruns:0 frame:0
TX packets:4966 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:222863 (217.6 KiB) TX bytes:1247796 (1.1 MiB)