PPTP Tunneling
From DD-WRT Wiki
Revision as of 18:44, 27 August 2006 (edit) Coperton (Talk | contribs) ← Previous diff |
Revision as of 02:29, 29 August 2006 (edit) (undo) AlReece45 (Talk | contribs) (Tidy up) Next diff → |
||
Line 1: | Line 1: | ||
- | + | ==Point-to-Point Tunneling with two DD-WRT== | |
- | + | ||
- | The | + | The configuration below was tested using two WRT54Gs (Hardware v2.2) and DD-WRT v23 SP1 std. |
+ | |||
+ | ===Scenario=== | ||
+ | |||
+ | *Network A in location "a" | ||
- | <u>Scenario:</u><br /> | ||
- | *Network A in location "a"<br /> | ||
- | <center> | ||
{| border=1 cellspacing=0 cellpadding=5 | {| border=1 cellspacing=0 cellpadding=5 | ||
| Router A address | | Router A address | ||
Line 17: | Line 17: | ||
| "direccion_de_A.dyndns.org" | | "direccion_de_A.dyndns.org" | ||
|} | |} | ||
- | </center> | ||
+ | * Network B in location "b" | ||
- | |||
- | *Network B in location "b"<br /> | ||
- | <center> | ||
{| border=1 cellspacing=0 cellpadding=5 | {| border=1 cellspacing=0 cellpadding=5 | ||
| Router B address | | Router B address | ||
Line 34: | Line 31: | ||
| "direccion_de_B.dyndns.org" | | "direccion_de_B.dyndns.org" | ||
|} | |} | ||
- | </center> | ||
- | <br /> | ||
- | :And you wish connect to any IP of the network A or B, not mattering in what of them was connected | ||
- | + | The purpose of this setup is to connect to any IP Address on network A or B from network A or B. | |
+ | == Configuration == | ||
- | + | === For Both Routers === | |
- | + | # Goto "Administration" tab and "Management" sub-tab | |
+ | # Enable DNSmasq and Local DNS | ||
+ | # Disable Loopback | ||
- | : | + | http://img237.imageshack.us/img237/9766/loopbackzs4.jpg |
- | + | ||
- | + | '''Note:''' Loopback must be disable because VPN doesn't always work when it is enabled. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | === For Router A === | |
- | + | ||
- | + | ==== Router B > VPN > Router A ==== | |
- | + | ||
+ | # Goto "Administration" tab and "Services" sub-tab | ||
+ | # Enable PPTP Server | ||
+ | # Set "Server IP or DNS Name" to "192.168.1.0" | ||
+ | # Set "Client IP(s)" to 192.168.1.200-250" | ||
+ | # Set "CHAP-Secrets" to "usernameA * passwordA *" | ||
+ | # Apply Changes | ||
+ | ==== Router A > VPN > Router B ==== | ||
+ | # Goto "Administration" tab and "Services" sub-tab | ||
+ | # Enable PPTP Client | ||
+ | # Set "Server IP or DNS Name" to the location of Server B (direccion_de_B.dyndns.org) | ||
+ | # Set "Remote Subnet" to "192.168.2.0" | ||
+ | # Set "Remote Subnet Mask" to 255.255.255.0 | ||
+ | # Set "MPPE Encryption" to required | ||
+ | # Set "MTU" to 1450 | ||
+ | # Set MRU to 1450 | ||
+ | # Set Username to usernameB | ||
+ | # Set password to passwordB | ||
+ | # Apply Changes | ||
- | + | http://img162.imageshack.us/img162/22/ruteadora6ir.jpg | |
+ | === For Router B === | ||
- | + | ==== Router A > VPN > Router B ==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | # Goto "Administration" tab and "Services" sub-tab | |
- | + | # Enable PPTP Server | |
- | + | # Set "Server IP or DNS Name" to "192.168.2.0" | |
- | + | # Set "Client IP(s)" to 192.168.2.200-250" | |
- | + | # Set "CHAP-Secrets" to "usernameB * passwordB *" | |
- | + | # Apply Changes | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
+ | ==== Router B > VPN > Router A ==== | ||
+ | # Goto "Administration" tab and "Services" sub-tab | ||
+ | # Enable PPTP Client | ||
+ | # Set "Server IP or DNS Name" to the location of Server A (direccion_de_A.dyndns.org) | ||
+ | # Set "Remote Subnet" to "192.168.1.0" | ||
+ | # Set "Remote Subnet Mask" to 255.255.255.0 | ||
+ | # Set "MPPE Encryption" to required | ||
+ | # Set "MTU" to 1450 | ||
+ | # Set MRU to 1450 | ||
+ | # Set Username to usernameA | ||
+ | # Set password to passwordA | ||
+ | # Apply Changes | ||
- | + | http://img73.imageshack.us/img73/4391/ruteadorb3nn.jpg | |
+ | == Notes == | ||
- | + | * The subnets should not intersect each other (i.e. The third octet of direction IP (192.168.thirdoctet.1) of the network A must be different of the network B. | |
- | + | * The range of Client IP(s) must be outside the range of DHCP clients. | |
- | + | * In the example the IP range that occurred for clients vpn ("Client IP(s)") was 192.168.x.200-250 therefore 51 VPN clients allowed | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
+ | == Monitoring == | ||
- | + | To monitoring and guarantee the connection you can setup Watchdog. The following instructions will setup watchdog to monitor the connection every five minutes. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | On both routers: | |
- | + | ||
- | + | ||
- | + | ||
- | + | # Goto "Administration" tab and "Keep Alive" sub-tab. | |
- | + | # Enable Watchdog | |
- | + | # Set "Interval" to 300 | |
- | + | # Set IP Addresses to "192.168.1.200 192.168.2.200" | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | http://img201.imageshack.us/img201/9416/keepaliveye2.jpg | |
- | + | ||
- | + | ||
- | + | == Another way to make VPN tunnel== | |
- | + | ||
- | |||
- | '''An other way to make VPN tunnel'''<br /> | ||
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=1767 | http://www.dd-wrt.com/phpBB2/viewtopic.php?t=1767 | ||
- | + | == Useful Links == | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
+ | [[PPTP_Server_Configuration]] | ||
+ | [[HOW_TO_configure_a_WINDOWS_BOX_to_make_a_VPN_Connection_to_linksys]] | ||
[[Category:advanced HOWTO]] | [[Category:advanced HOWTO]] | ||
- | |||
[[Category:English documentation]] | [[Category:English documentation]] |
Revision as of 02:29, 29 August 2006
Contents |
Point-to-Point Tunneling with two DD-WRT
The configuration below was tested using two WRT54Gs (Hardware v2.2) and DD-WRT v23 SP1 std.
Scenario
- Network A in location "a"
Router A address | 192.168.1.1 |
DHCP range | 192.168.1.100-150 |
Dyndns address | "direccion_de_A.dyndns.org" |
- Network B in location "b"
Router B address | 192.168.2.1 |
DHCP range | 192.168.2.100-150 |
Dyndns address | "direccion_de_B.dyndns.org" |
The purpose of this setup is to connect to any IP Address on network A or B from network A or B.
Configuration
For Both Routers
- Goto "Administration" tab and "Management" sub-tab
- Enable DNSmasq and Local DNS
- Disable Loopback
http://img237.imageshack.us/img237/9766/loopbackzs4.jpg
Note: Loopback must be disable because VPN doesn't always work when it is enabled.
For Router A
Router B > VPN > Router A
- Goto "Administration" tab and "Services" sub-tab
- Enable PPTP Server
- Set "Server IP or DNS Name" to "192.168.1.0"
- Set "Client IP(s)" to 192.168.1.200-250"
- Set "CHAP-Secrets" to "usernameA * passwordA *"
- Apply Changes
Router A > VPN > Router B
- Goto "Administration" tab and "Services" sub-tab
- Enable PPTP Client
- Set "Server IP or DNS Name" to the location of Server B (direccion_de_B.dyndns.org)
- Set "Remote Subnet" to "192.168.2.0"
- Set "Remote Subnet Mask" to 255.255.255.0
- Set "MPPE Encryption" to required
- Set "MTU" to 1450
- Set MRU to 1450
- Set Username to usernameB
- Set password to passwordB
- Apply Changes
http://img162.imageshack.us/img162/22/ruteadora6ir.jpg
For Router B
Router A > VPN > Router B
- Goto "Administration" tab and "Services" sub-tab
- Enable PPTP Server
- Set "Server IP or DNS Name" to "192.168.2.0"
- Set "Client IP(s)" to 192.168.2.200-250"
- Set "CHAP-Secrets" to "usernameB * passwordB *"
- Apply Changes
Router B > VPN > Router A
- Goto "Administration" tab and "Services" sub-tab
- Enable PPTP Client
- Set "Server IP or DNS Name" to the location of Server A (direccion_de_A.dyndns.org)
- Set "Remote Subnet" to "192.168.1.0"
- Set "Remote Subnet Mask" to 255.255.255.0
- Set "MPPE Encryption" to required
- Set "MTU" to 1450
- Set MRU to 1450
- Set Username to usernameA
- Set password to passwordA
- Apply Changes
http://img73.imageshack.us/img73/4391/ruteadorb3nn.jpg
Notes
- The subnets should not intersect each other (i.e. The third octet of direction IP (192.168.thirdoctet.1) of the network A must be different of the network B.
- The range of Client IP(s) must be outside the range of DHCP clients.
- In the example the IP range that occurred for clients vpn ("Client IP(s)") was 192.168.x.200-250 therefore 51 VPN clients allowed
Monitoring
To monitoring and guarantee the connection you can setup Watchdog. The following instructions will setup watchdog to monitor the connection every five minutes.
On both routers:
- Goto "Administration" tab and "Keep Alive" sub-tab.
- Enable Watchdog
- Set "Interval" to 300
- Set IP Addresses to "192.168.1.200 192.168.2.200"
http://img201.imageshack.us/img201/9416/keepaliveye2.jpg
Another way to make VPN tunnel
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=1767
Useful Links
HOW_TO_configure_a_WINDOWS_BOX_to_make_a_VPN_Connection_to_linksys