linux - Raspberry Pi VPN with 3g dongle for internet access

08
2014-07
  • user229211

    I'm trying to set up a VPN connection on my RPi, but always times out. I have a DDNS setup and the public IP address is updated using ddclient. I have a network machine connected to eth0 and a 3g dongle (eth1) connected via a powered usb hub, and have tested the settings with a normal router with port forwarding and all worked.

    Unfortunately I need to put the Pi in a location where normal Internet connections are not available (hence the 3g dongle). The Pi seems to ignore or is unaware of any incoming connections when I try to connect with my pc. It may just be an iptables command that I have not yet worked out or some kind of routing issue. Can anyone help?

  • Answers
  • hashess

    Maybe iptables might be blocking 3G key incomming traffic. You set up the wired schema but not the 3G one. If it doesn't answer in 3G, it has something to do with your permission/iptables. Maybe check /etc/host.allow also.


  • Related Question

    Using a Raspberry Pi as a VPN?
  • sudo rm -rf

    So I'm sure many of you have heard of the new Raspberry Pi project. I was looking at messing around with Model B, which has the following relevant specs:

    Broadcom BCM2835 700MHz ARM1176JZFS processor with FPU and Videocore 4 GPU
    256MB RAM
    Boots from SD card, running the Fedora version of Linux (ARM Version)
    10/100 BaseT Ethernet socket
    USB 2.0 socket
    

    So I was curious if it would be possible to create a simple VPN out of this little machine. I do realize that since it's an ARM processor that might mess up quite a few things. Any ideas if this is possible?

    Just for what it's worth, this would be a personal project so I'm not worried about performance.


  • Related Answers
  • slhck

    People have built OpenVPN for BeagleBoard, so, in the worst case, you should be able to do something similar. The Raspberry has a lot of press, so it's possible there'll be pre-compiled packages available in the near future, also.

    I see this Fedora ARM package. I'm unfamiliar with the naming conventions for non-Intel builds, so I'm not sure if that fits, though.

  • slhck

    I'm not a huge Linux expert by any means and so the various tutorials were not enough for me to get a PPTP VPN working on the Pi. I wanted PPTP as Windows 7 and iDevices support it out the box. I finally got it working and documented the process in my blog:

    RaspberryPi as a PPTP VPN Server - HOWTO

    In summary, yes the RasPi can definitely function as a VPN endpoint (that costs £35 and uses 5W electricity...) and it does so well. I used the Arch Linux distro but no reason Fedora shouldn't work. I haven't tried having more than two clients connected though.

  • slhck

    It can run Fedora. You can get VPN code for Fedora, in fact it's powerful enough to run a decent Fedora desktop – it'll run a simple VPN just fine.

    Maybe don't plan on using it for a corporation, but it'll work.

  • slhck

    Look here:

    How to Setup a VPN (PPTP) Server on Debian Linux

    It tells you how to set up the pptpd service which is what you need. It works for me connecting from my iPhone with the VPN setting pointing to my Pi's IP.

    There is no building or compiling or similar. Just apt-get the pptp and configure your IP and user settings as described.