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

Need help making my WRT54GL a perfect VPN server

Discussion in 'DD-WRT Firmware' started by Müllmann, Jul 30, 2009.

  1. Müllmann

    Müllmann Guest

    So, what's a perfect VPN server? In my case, one that can serve as an internet gateway for my iPhone. I think this is nessesary when using free/open WiFi networks.
    Practical solutions for this task are i think: either PPTP or L2TP(over IPSEC)
    Allright, i'm not talking about Open****ingVPN. Would be nice in situations where i need access to my home-pc, though.
    I spent several days setting up services on my pc, nothing ever worked because in my old router VPN-Passthrough was ****ed up and/or simply not inplemented, so i bought a WRT54GL (1.1) because i've seen much blahblah about dd-wrt beeing such great software.
    So much for background. My questions:
    - Can DD-WRT do this job?
    - What version/edition/build do i need to flash?

    I'm so sick of googeling around. There is so much false information out in da inturblags ><
     
  2. ad5mb

    ad5mb Addicted to LI Member

  3. gawd0wns

    gawd0wns LI Guru Member

    Socks 5 Proxy with OpenSSH

    You can run an SSH server on Tomato or DD-WRT, and create an ssh tunnel with OpenSSH on your Ipod.

    You need Terminal access on your ipod, Cydia package manager, and an ftp server running on your pc. First, install Cydia if you don't have it. Next, install OpenSSH, ncftp, and nano (not required but good to have) with Cydia.

    On your pc, create a text file with this text which will serve as a simple connect script, let's call it "myssh":

    ssh -D 443 -c aes128-ctr -p 53025 root@yourip(I recommend you get a free dyndns account)

    After you install OpenSSH, run ssh-keygen -b keysize (however large you want it: 1024, 2048, 3072, 4096). Next, upload the public key to your pc and download myssh, via ncftp. Open the public key with a text editor, and copy/paste the text in the SSH keys section of Tomato (Administration --> Admin Access). Uncheck allow password login, check Remote Access, and specify an external port number (53025 as we used above). On your ipod, exit the ftp client, and set execute permissions for the myssh file:
    chmod 500 myssh

    ssh -D 443 will create a tunnel and forward all traffic to the ssh server through port 443 of your device. In order to use this, we have to tell your device to forward all traffic to port 443. The only way I have figured out how to do this successfully is to upload a .PAC configuration file on the internet, and to specify the URL to it under your network proxy settings (Settings > Wifi > Choose On > Choose your connection > Hit the blue arrow > Scroll Down > HTTP Proxy: Manual). If you don't have a website, you can get one of those free sites. If you figure out how to point to the file locally, let me know.

    So create a file in notepad called prox.pac with the following 3 lines of text:

    function FindProxyForURL(url, host) {
    return "SOCKS 127.0.0.1:443";
    }

    After the file is uploaded, you are ready to go in two steps. You have to connect in this order each time:

    1. Connect to your ssh server: sh myssh
    2. Paste the URL to the .pac file in the HTTP proxy section.

    Save the http link somewhere on the device for future use. Be sure the link is not present in the HTTP proxy section BEFORE connecting to the ssh server. If it is, all of your connection attempts will fail, and you will not be able to use the internet.
     

Share This Page