Create a private VPN Server with DD-WRT

You can set up your own VPN server at home or small office. Use it to securely connect to your network when you are outside.

Network administration - Virtual private networks, Virtual Private Network, are not just for corporate networks. You can set up your own VPN server at home or small office . Use it to securely connect to your network when you're outside, gaining access to shared folders and network computers. You can also see its usefulness in public networks or Wi-Fi hotspots, securing your traffic in front of snoopers.

Picture 1 of Create a private VPN Server with DD-WRT
One way to set up a VPN server is to simply load DD-WRT into your router, if it's compatible. DD-WRT is a software replacement. It replaces the router's brain, giving it a new control panel with more features, such as a VPN server. You can check the compatibility with your router here.

In this article, we will show you the DD-WRT Point-to-Point Tunneling Protocol (PPTP) feature. Although PPTP has many of the same vulnerabilities as other protocols, sometimes we can still accept some level of risk. In addition to easy configuration and management, PPTP is also supported in Windows.

However, there is one problem to keep in mind first, if you have to work with customer data or highly sensitive information then you definitely need to consider a safer VPN solution. Maybe after this tutorial we will show you how to set up OpenVPN in DD-WRT, this is a safe solution but the installation will be much more complicated. In addition, users must download and configure the client utility to connect.

Router

Start with Router Database. Type in the carrier or model number and hope it will provide you with a list of compatible software versions as well as variants. Not arbitrarily, please carefully follow all the installation instructions.

The most stable release of DD-WRT at the time of publication of this article is v24 SP1 (Build 10020), which is what we will use in this tutorial. These directions also work with v24 SP2 because we tested with Beta 13064 build.

Note that, you do not have to use the VPN variant if you just want to use PPTP VPN server or client; they are available in all variants except Mini. Special VPN variants allow you to get more secure OpenVPN servers and clients, so use it if you plan to try it later.

Enable PPTP VPN Server

To start, log in to the web control panel. Type the IP address 192.168.1.1 into the web browser. The first time you access the router, you will be prompted to create a username and password.

Click the Services tab and select the PPTP sub tab. In the PPTP Server area, select Enable . Then enter the IP address of the router (192.168.1.1) for Server IP.

For IP clients, enter an address if you only have one user. If there are multiple users, you can specify the address range. Should choose an address or range that does not conflict with the router's IP and client IPs (192.168.1.100 - 192.168.1.149). An acceptable range might be 192.168.1.2-99 (192.168.1.2 - 192.168.1.99) or even 192.168.1.200-249 (192.168.1.200 - 192.168.1.249). Need to specify ranges with a shorter format; Do not group all addresses for an IP.

The CHAP-Secrets text box is where you specify usernames and passwords. Need to enter them in a special format: username, space, asterisk, password, space and asterisk. Here is an example:

joe * joespassword *
jane * janespassword *

If you are running a RADIUS / AAA server, you can verify the VPN user for it by enabling RADIUS and entering server details.

When all is done, click Apply Settings , then your changes will be saved and applied.

Kiểm TRA

Now we will test the VPN server on the local network:

In Windows XP, click Start> Connect to> Show all connections . Then on the window that appears, double-click New Connection Wizard . On the wizard, click Next . Click Connect to the network at my workplace and click Next . Select the Virtual Private Network connection and click Next . Type in a name for Company Name and click Next . Enter the internal IP of the router (192.168.1.1), click Next , and then click Finish . The login dialog box will appear, this is where you can enter the username and password you created on the server. Then click Connect and it will work.

In Windows 7, call Network and Sharing Center and click Set up a new connection or network . On the Wizard, select Connect to a workplace and click Next. Click Use my Internet connection (VPN) . On the next page, enter the router's internal IP address (192.168.1.1), type in the destination name, and then click Next. You will be prompted for username and password. Enter the username and password you set before you configure the server and click Connect. Wait a minute, if successful, it will say that You are connected .

Create a Hostname for dynamic IP

If the DD-WRT router is connected to the Internet that has a changed IP address (also known as a dynamic address), then you will definitely want to set up a hostname (sub-domain). This allows you to get an Internet address (for example, myhomenet.getmyip.com ) that always points to the router's current IP. Allows you to connect to the VPN server when out and about without having to worry about changing the IP. Conversely, if it has changed, someone must have physically checked the router and given you a new IP.

No-IP and Afraid.org are two free dynamic DNS services that you might consider now. When registering the service, you will have a host name, account name, and password. Launch the DD-WRT control panel, click Setup> DDNS and enter the required information. Then your router will always update the service and hostname with your current IP.

Don't forget to use your hostname instead of Internet IP when configuring VPN client settings.

Configure remote access

To connect to your VPN server from the Internet when away, Windows must be configured to your Internet IP address (or hostname if you have created it), not a local IP address (192.168.1.1). If you follow the directions above and have created a connection from within the local network, then you can change the IP:

In Windows XP, click Start> Connect to> Show all connections . Then right-click on the VPN connection and select Properties .

In Windows 7, click the network icon, right-click the VPN connection from the list and select Properties .

Start connecting

Now everything is ready for you to go. The next time you need to access the network while you're out and secure your traffic on a public network, you can use your VPN server. However, just remember that the remote router and the network must also allow VPN connections, which usually does not cause problems.

Update 26 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile