I have a pptp VPN server set up on my Raspberry Pi at home, and it works really well, except when I'm stuck behind my college's firewall. I can SSH into it through commonly open firewall ports (443, 8080), but I was wondering if I could do the same with VPN.

The way I see it is it should work, since there are 4 ports that I know of open that I can SSH to my Raspberry Pi through (Not port 22 however!), but VPN just won't work. I have tried tinkering for the last two hours, but no luck. Has anyone done something like this before?

  • 1
    what have you tried so far (please include in your question)? i assume you've tried ssh tunneling and vpn from there? – h3rrmiller Jan 10 '13 at 14:51
  • 1
    I have tried commands like this on my local machine (my mac): ssh -N -p 443 user@domain.com -L 1723/localhost/8080. I wasn't sure but I figured this would take direct my VPN connection attempts from 1723 to 8080. I also had the 'local IP' in my ssh prefs on my Raspberry Pi set to 8080 – Conor Taylor Jan 10 '13 at 14:55
  • 2
    you need to use the -w to specify a tunnel interface instead of creating a forward tunnel. take a look at wiki.archlinux.org/index.php/VPN_over_SSH also take a look at github.com/apenwarr/sshuttle – h3rrmiller Jan 10 '13 at 15:02
  • Thanks, I have been using sshuttle for the time being, I just wanted to be able to flick the VPN switch and have it turn on as if it weren't behind a firewall at all – Conor Taylor Jan 11 '13 at 0:23

You can use -w key with ssh. An example:

# ssh root@ssh-server -w 0:0 "/sbin/ifconfig tun0 pointopoint"
# ifconfig tun0 pointopoint
# route add -host ssh-server dev eth0
# route del default
# route add default gw

But you need connect with root privileges to your ssh-server and tune iptables for NATing your traffic. Don't forget to turn on PermitTunnel point-to-point in your /etc/ssh/sshd_config onto ssh-server


pptp is limited to port 1194 i had a similar problem not so long time ago. You can use another VPN technology than pptp. Look that :

In .ssh/config :

host raspberrypi.machine
hostname Your_Ip
localforward 1194 Your_Ip:1194

then ssh to raspberrypi.machine

Connect your pptp client to localhost 1194 and it should work.

Your Answer

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

Not the answer you're looking for?Browse other questions tagged or ask your own question.