I have been playing with a (Raspian distro) Raspberry Pi for a while and and set it up to use VPN, unfortunately I keep on getting issues keeping and getting connected to the VPN.
I know my setup is right because it does work from time to time, but when it doesn't I can't figure out why...
An ifconfig shows this, but no traffic is passing through tun0:
Code: Select all
eth0 Link encap:Ethernet HWaddr b8:27:eb:54:d3:ba
inet addr:192.168.0.19 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1955 errors:0 dropped:1 overruns:0 frame:0
TX packets:1607 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:306023 (298.8 KiB) TX bytes:1037299 (1012.9 KiB)
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:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1512 (1.4 KiB) TX bytes:1512 (1.4 KiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:xx.xxx.123.126 P-t-P:xx.xxx.123.125 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)
Code: Select all
sudo route add default gw xx.xxx.123.126 tun0
I also tried to ping the P-t-P address, and it fails.
Here's the log at boot:
Code: Select all
Oct 5 12:38:06 raspberrypi ovpn-client[2205]: OpenVPN 2.2.1 arm-linux-gnueabihf [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Jun 15 2013
Oct 5 12:38:06 raspberrypi ovpn-client[2205]: WARNING: file 'userpass.txt' is group or others accessible
Oct 5 12:38:06 raspberrypi ovpn-client[2205]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Oct 5 12:38:06 raspberrypi ovpn-client[2205]: WARNING: file '555555.key' is group or others accessible
Oct 5 12:38:06 raspberrypi ovpn-client[2205]: WARNING: file 'ta.key' is group or others accessible
Oct 5 12:38:06 raspberrypi ovpn-client[2205]: Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
Oct 5 12:38:06 raspberrypi ovpn-client[2205]: LZO compression initialized
Oct 5 12:38:07 raspberrypi ovpn-client[2206]: UDPv4 link local: [undef]
Oct 5 12:38:07 raspberrypi ovpn-client[2206]: UDPv4 link remote: [AF_INET]xxx.xx.189.5:1194
Oct 5 12:38:07 raspberrypi ovpn-client[2206]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Oct 5 12:38:08 raspberrypi ovpn-client[2206]: [us-east.vpnme.com] Peer Connection Initiated with [AF_INET]xxx.xx.189.5:1194
Oct 5 12:38:10 raspberrypi ovpn-client[2206]: TUN/TAP device tun0 opened
Oct 5 12:38:10 raspberrypi ovpn-client[2206]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Oct 5 12:38:10 raspberrypi ovpn-client[2206]: /sbin/ifconfig tun0 xx.xxx.123.126 pointopoint xx.xxx.123.125 mtu 1500
Oct 5 12:38:10 raspberrypi ovpn-client[2206]: /etc/openvpn/update-resolv-conf tun0 1500 1558 xx.xxx.123.126 64.156.123.125 init
Oct 5 12:38:11 raspberrypi ifplugd(tun0)[2364]: ifplugd 0.28 initializing.
Oct 5 12:38:11 raspberrypi ifplugd(tun0)[2364]: Using interface tun0/00:00:00:00:00:00 with driver <tun> (version: 1.6)
Oct 5 12:38:11 raspberrypi ifplugd(tun0)[2364]: Using detection mode: SIOCETHTOOL
Oct 5 12:38:11 raspberrypi ifplugd(tun0)[2364]: Initialization complete, link beat detected.
Oct 5 12:38:11 raspberrypi ifplugd(tun0)[2364]: Executing '/etc/ifplugd/ifplugd.action tun0 up'.
Oct 5 12:38:11 raspberrypi ifplugd(tun0)[2364]: client: Ignoring unknown interface tun0=tun0.
Oct 5 12:38:11 raspberrypi ifplugd(tun0)[2364]: Program executed successfully.
Oct 5 12:38:12 raspberrypi ntpd[2143]: Listen normally on 3 tun0 xx.xxx.123.126 UDP 123
Oct 5 12:38:12 raspberrypi ntpd[2143]: peers refreshed
Iptables -L gives me this:
Code: Select all
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
unknown.Level3. * 255.255.255.255 UH 0 0 0 tun0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
Any ideas?
THX!