My goal is to set up my Raspberry Pi such that it is always connected to my VPN and can be always accessed by SSH and VNC.

I use PrivateInternetAccess and Open VPN. Using this article I figured out how to launch the VPN on boot (so that i can eventually ditch the monitor and operate entirely over SSH). Except now my SSH gives me:

ssh: connect to host port 22: Connection refused

According to the ifconfig output and my router settings, is the right number, but it's not working at all. I can kill the VPN and the SSH is fine. I feel like I must be doing something wrong.

Edit: here's my IP table as asked by a commenter:

Before VPN:

pi@raspberrypi ~ $ ip route
default via dev eth0 dev eth0 proto kernel scope link src dev wlan0 proto kernel scope link src

After VPN:

pi@raspberrypi ~ $ ip route via dev tun0 
default via dev eth0 via dev tun0 dev tun0  proto kernel  scope link  src via dev eth0 via dev tun0 dev eth0  proto kernel  scope link  src dev wlan0  proto kernel  scope link  src
  • Can you post your routing table before and after you connect to the VPN? Use the route or ip route commands to get the table. – Bert Dec 6 '14 at 23:40
  • Is the computer that you are using to connect with behind a VPN? – Logern Dec 7 '14 at 2:07
  • @Logern no the computer I'm using to initiate the ssh connection is not behind a VPN. But it is on the same local network – user1502186 Dec 7 '14 at 21:18
  • @Bert sure no problem. (edit: will edit my original Q) – user1502186 Dec 7 '14 at 21:18
  • That error reads to me like a firewall issue. – Davidw Dec 7 '14 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.