Using a Pi as a Server and Client

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
revo
OpenVpn Newbie
Posts: 1
Joined: Sun Apr 10, 2016 12:02 pm

Using a Pi as a Server and Client

Post by revo » Sun Apr 10, 2016 12:30 pm

Hey Guys,

I've been wondering what I need for my desired setup.

I've got a Raspberry Pi with ArchARMv7 running successfully an OpenVPN Server since couple of months. I'm regularly connecting to it with my Manjaro Linux laptop mainly to use a NFS share from everywhere.

Now I want to extend the VPN features. I got myself a premium account on AirVPN to enhance my online anonymity. So I thought, instead of either connecting to my LAN or to AirVPN I'll connect my Raspberry Pi to AirVPN, routing all the outgoing traffic over it (optionally not while using my Privoxy proxy server which runs on the Pi as well).

So far I got both OpenVPN Networks up

Code: Select all

[root@ArchARMv7 ~]# ifconfig
.
.
.
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.8.0.1  netmask 255.255.255.255  destination 10.8.0.2
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 1292  bytes 134974 (131.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1400  bytes 905786 (884.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.4.24.114  netmask 255.255.0.0  destination 10.4.24.114
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
.
.
[root@ArchARMv7 ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=46 time=34.1 ms
tun0 is the VPN Server, tun1 the VPN Client and pinging google works as well.

When I now try to connect to my VPN Server with my client the connection won't establish (between my laptop and the pi). The Network Manager simply stops trying after a while.

Don't know if this output of the server is related to the problem.

Code: Select all

[root@ArchARMv7 ~]# dmesg |tail
[   10.982800] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   10.994511] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.649678] NFSD: starting 90-second grace period (net 80b10d80)
[   12.497545] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   12.508427] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
I think I need to change a firewall rule, but since I'm not sure what I actually want I'm hoping you can provide me some expertise. Thank you very much :) !

adamjgs
OpenVpn Newbie
Posts: 9
Joined: Wed Apr 13, 2016 3:31 am

Re: Using a Pi as a Server and Client

Post by adamjgs » Wed Apr 13, 2016 5:48 am

Have look through your logs for warnings/errors. On the rpi, add the following to both client and server .conf:

verb 4 (or change whatever exists to 4)

and

log /var/log/openvpn-server.log (change to -client for client .conf)

Restart both client and server and take a look at the logs.

Post Reply