Saturday, January 17, 2009

HOWTO: Windows Mobile VPN connection to DD-WRT

So, after a little bit of screwing around, I have gotten my Windows Mobile phone to connect to my home network via a PPTP VPN to my DD-WRT router. My main goal for this was to allow my SIP client (I'm using SJ Phone) to connect to my Asterisk Box behind the firewall.

Here's how I did it!

On DD-WRT router/firewall
Go to Services->PPTP
Click "enable"

Enter the following:
Server IP:
(internal IP address of router)

Client IP(s):
(a range of internal IP addresses that are unoccupied)

CHAP-Secrets: myusername * mypassword *
(Asterisks and spaces are required as shown)

Hit apply-settings, and save.

On the Windows Mobile Phone
Go to Start->Settings->Connections,
Click the advanced tab
Click select networks
Set to the following:
"Programs that automatically connect to the Internet should connect using: 'My ISP'"
"Programs that automatically connect to a private network should connect using: 'My Work Network'"
Hit Ok
Click to the Tasks tab
Under "My Work Network", click "Edit my VPN servers"
Click "New"

Enter the following:
Name: "Home VPN" (or whatever you want)
Hostname or IP: "" (assuming you have some kind of ddns setup)
VPN type: PPTP
Click Next

Enter the following:
User name: myusername (Or whatever you used above)
Password: mypassword (Or whatever you used above. NOTE: this probably won't be remembered by the device anyway)
Domain: (Leave Blank)

Click Finish

Tell the phone to connect to the VPN

With your device outside your LAN, activate your VPN connection as follows:

Under "My Work Network" Click Edit my VPN Servers
Click and hold the VPN connection entry
Choose "Connect"
Enter your username and password (if asked) (leave domain blank again)
You should see it connect. If you don't see an error pop up, it worked!

Configure SJPhone
Next, configure SJPhone to connect to the internal IP address of the asterisk box:
Click the "Profiles" tab
Click "new"
Profile Name: My asterisk box
(rest as defaults)
Click the "SIP proxy" tab
Proxy domain: (or your asterisk box internal IP) : 5060

Click Ok, and your SIP device should register! If you drop your VPN connection, you may need to manually force SJPhone to reregister the SIP connection before you can make/receive calls again.

1 comment:

alex smith said...

After an initial hiccup the aftersales service was fantastic. I am running vpn and couldn't be happier. I can access sites that i want and a little quicker than before. Simple to install and a great've got me as a long term customer!! Thanks very much guys.