Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

SoftEther VPN install script for Raspberry Pi

RiaRia Member ✭✭
edited June 6 in New Ideas
I've been asked by people online and offline for help with setting up a VPN using Raspberry Pi. Some have asked for an image. While I'm happy to help, I ended up making a script to automate the install. All it does is download, compile install and configure SoftEther for L2TP use. It also provides instructions for setting up routers and clients. 

You should install the updates for your pi in addition to this when you first set it up.

For now it is a basic, no-frills shell script. I'll add stuff later on, such as generating a profile for easy config of your iPhone/iPad. 

If you want it, drop me a line. My email is good in QRZ. 
5 votes

Open for Comments · Last Updated

«1

Comments

  • WX7YWX7Y Member ✭✭
    edited June 6
    Ria, could you please send me your scripts and instructions please?
    My direct email is <bret(dot)wx7y(at)gmail(dot)com>
    thank you VERY much for your time!

    Bret
    WX7Y

  • RiaRia Member ✭✭
    edited October 2016
    Check your email. I really need a place to host this too, probably will work better than me emailing it
  • John-K3MAJohn-K3MA Member
    edited November 2019
    Will this work on a older version of the PI....Model B?

    Ria, TU for your work on the script and sharing it.
  • RiaRia Member ✭✭
    edited October 2016
    Works on everything that runs Linux.
    And you're welcome. :)
  • Chris Tate  - N6WMChris Tate - N6WM Member ✭✭
    edited November 2019
    Softether is really a great application suite, there are a number of vpn solutions but this one is really well thought out, cross platform and works well.  Definitely a good solution to counter the abrupt removal of PPTP from iOS forcing a switch to L2TP as the next simplest solution for your iOS and windows device.  Using the right tools once can take a softether bridge enabled Pi on the road with a Maestro and connect to your flex environment from anywhere.
  • Ali - 9K2WAAli - 9K2WA Member
    edited November 2019
    Thanks Ria,

    SoftEther L2TP is working fine for me on my Raspberry PI now, excellent job.
  • RiaRia Member ✭✭
    edited October 2016
    I'm going to write another script to setup a bridge (site to site VPN), automagically. Need to setup two pis to test it on. 
  • RiaRia Member ✭✭
    edited October 2016
    Glad I was able to help!
  • Chris Tate  - N6WMChris Tate - N6WM Member ✭✭
    edited October 2016
    this one may be a bit tough to script b/c you will need to pass some arguments that could vary.  a second USB Ethernet adapter is needed in this scenario.  Sounds like your up to the challenge though!  ;-).
  • Chris Tate  - N6WMChris Tate - N6WM Member ✭✭
    edited November 2019
    Incidentally.. if the whole linux thing is intimidating to you and you just don't want to go there, you can install SoftEther server on a windows device in your environment as well.  Its more expensive but if you have a separate box doing other duties it is available and well documented on the softether site.  Part of the attraction of softether is their comprehensive documentation, extremely well done.
  • RiaRia Member ✭✭
    edited October 2016
    Not difficult, I've been at this a while, since high school... 

    The pi 3 has wifi and ethernet. I don't think you'd need another ethernet adapter unless you're connecting to a wired network. 
  • RiaRia Member ✭✭
    edited October 2016
    This was the idea of the script, to make it easy for people so they can use a cheap, low power consumption Raspberry pi box instead of a power hungry PC which is overkill for this application. Seems to work out quite well. 
  • Rob G6EIHRob G6EIH Member
    edited December 2016
    Use Linux every day, always good to have a script that works and thanks Ria.
  • Chris Tate  - N6WMChris Tate - N6WM Member ✭✭
    edited October 2016
    I had to use an external wifi bridge in one application b/c I was having trouble getting the internal wifi adapter to work with S/E.  It may have been a bug in an earlier release.  K6OZY and a number of use started experimenting with this withing days of the release of LAN remote functionality.  having both options is good too.  Happy to see you doing this though for sure and look forward to seeing it contributed to the community.  Much appreciated.
  • Chris Tate  - N6WMChris Tate - N6WM Member ✭✭
    edited October 2016
    yep.. absolutely.  Some folks may have an extra windows box out there just letting them know the options. I personally prefer the RasPi option but have installed both successfully.
    
  • Rob G6EIHRob G6EIH Member
    edited March 2017
    Yes totally agree, I have it on W7 & W10 boxes however I prefer run it on the Pi.
    Windows boxes are power hungry devices and with all the updates who knows when they will break yet again, I just find Linux a much more stable platform to leave running in the background.

    Isn't It great we have all these different ways to us the Flex ecosystem.
  • Bruce  PY2BSBruce PY2BS Member
    edited November 2019
    Hi Ria, It's working perfectly here, I'm using the 6500 remotely, no issues at all, thank you a lot for making the script available.
  • RiaRia Member ✭✭
    edited March 2017
    You're welcome. 
  • Ed WoodrickEd Woodrick Member
    edited April 2017
    It would be so nice if the Flex devs could just change the software wo allow manual IP configuration instead of the AutoDiscover that the clients do. And then just publish the ports in use.
  • edited November 2019
    Hi Ria!

    Good morning!
    Have installed your script in a PI3B with sucess.
    Thank you so much! I am having a lot of fun using my VPN  remote acess.
    Just for your records, I had to re-run  your script after a cold reboot of raspbian , to get the configuration questions.

    Best 73

    PY2GN William Schauff

       
  • RiaRia Member ✭✭
    edited April 2017
    Hi William. Glad it worked out for you.
  • K1IMDK1IMD Member
    edited May 2017
    Ria,
    I have used your script to build a VPN for my home station and a friend's as well.. works(ed) great for 3 months.  Not sure if Jessie updates caused problems or Windows 10 Creator update did.  Nothing else has changed but I get intermittent connections.  Most of the time it times out with the Windows VPN complaining:

    Can't connect to VPN
    The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer.

    I have rebuilt the card 2 times and get the same errors... once in a long while it will connect.  I am lost... can you shed some light on the problem?

    73
    Jon
    K1IMD
  • RiaRia Member ✭✭
    edited May 2017
    This is usually a generic error that indicates negotiation failed for some reason.

    Make sure the time on the pi is correct (pi should automatically sync via ntp since it has no rtc). Make sure time is correct on the Windows machine. Use Meinberg to get it synchronized.

    I'm going to update the script to use the latest version of softether as there has been some updates. 

    Ria
  • RiaRia Member ✭✭
    edited May 2017
    Latest version here:
    https://drive.google.com/open?id=0B0HrAJwAk8BjdG8zOEJ4TG5jYjA

    Only thing that has changed is it uses the latest version of softether, which is from November 27, 2016.

    Ria
  • K1IMDK1IMD Member
    edited May 2017
    Good Afternoon Ria,
    Everything on my LAN is "sync'd" via NTP using the same NTP server hosted on my IRLP node which gets time from an Internet time source (ntp.org).  The time is very very close.  The remote PC's tested are also getting time from the Internet.  All devices have time that is very close to one another... how close does the time need to be?

    I will look at the Meinberg app to synchronize the windows computer.

    FWIW, the VPN would not connect on my cellphone (iPhone) either which should have accurate time from the cellular carrier (AT&T).

    The SoftEther manager connects without difficulty... thought it might have been some weird Windows firewall problem but I disabled the firewall which made no difference.

    I will run the updated script... do I assume I must start from scratch?  ie. I can't run the script on a system that has SoftEther already installed.  I assume that the update will likely not solve my problem.

    I do have a copy of the original image that worked FB for 3 months before these problems occurred.

    I will let you know how it turns out.  Looks like no smoking gun... :(

    73
    Jon
    K1IMD

  • Mark WS7MMark WS7M Member ✭✭
    edited November 2019
    Hi Ria,  I wanted to try your script but the google site seems to have some trash at the end of the script and it comes across corrupt.

    Would you be willing to email me a zipped copy?   [email protected]  works.  Thanks
  • RiaRia Member ✭✭
    edited May 2017
    Hi Mark,

    That's a feature, not a bug. It's a self extracting script with multiple files. The "trash" at the end is a tar archive. Download as-is and scp to the pi to use it. 

    Ria

  • Mark WS7MMark WS7M Member ✭✭
    edited May 2017
    Yeah I've seen those before but this one is not working for some reason.

    In the past when I've done these kinds of things I zip or tar them as for some reason my download is losing line feeds and things are looking really strange.

    When I run it I get things like  "fi not found line 39" etc.

    anyway I think I have the server installed now I just have to get it to give me an IP I can work with... sigh...
  • RiaRia Member ✭✭
    edited May 2017
    I'll check again. I did the packaging on my Mac and not on a pi but it should work, as I did that last time.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.