1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script for Macos or Linux connection to WRV54G

Discussion in 'Cisco Small Business Routers and VPN Solutions' started by tji, Jun 11, 2005.

  1. tji

    tji Network Guru Member

    After figuring out how to connect to the WRV54G using wget to retrieve the pre-shared key, I connected to my VPN by manually copying the psk into IPSecuritas. This method worked, but was quite cumbersome.

    So, I hacked together a shell script that takes all the connection parameters and grabs builds the config files, including the PSK output from wget. Now I can complete an IPSec connection by calling a single shell script. Basically, it's the poor man's command-line equivalent of QuickVPN.

    I have tested it under MacOS X 10.4.1. But, it should also work with Linux kernel 2.6 with minor modifications. Linux now uses the same "KAME" ipsec code as Mac/BSD.

    A couple caveats:
    - It requires root / sudo privileges to run. The ipsec tools need root privileges to update the config settings, so I don't know any way around this.
    - You will need to modify the script to look at the right ethernet port of you change ports (e.g. from wifi to wired). I may add some logic to figure out which port to use (this would be easy with C or Perl.. but not so obvious to me in a bash shell).

    If there is any interest in this script, I can clean it up and post it here for others to use.
     
  2. DanieleProcida

    DanieleProcida Network Guru Member

    I'd like to see it, having tried and failed to get connected using a Mac VPN client. Have you been able to connect from behind NAT?

    Daniele
     

Share This Page