0

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 192.168.1.146 port 22: Connection refused

According to the ifconfig output and my router settings, 192.168.1.146 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 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.143
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.146

After VPN:

pi@raspberrypi ~ $ ip route
0.0.0.0/1 via 10.194.36.5 dev tun0 
default via 192.168.1.1 dev eth0 
10.194.36.1 via 10.194.36.5 dev tun0 
10.194.36.5 dev tun0  proto kernel  scope link  src 10.194.36.6 
85.159.237.4 via 192.168.1.1 dev eth0 
128.0.0.0/1 via 10.194.36.5 dev tun0 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.143 
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.146
  • 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.